/**
 * Frontend Survey Styles
 * Clean, modern design for embedded survey form
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

/* Survey Container */
.survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Survey Header */
.survey-header {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.survey-header h1 {
    color: #000;
    font-size: 28px;
    margin-bottom: 10px;
}

.survey-header p {
    color: #666;
    font-size: 16px;
}

/* Form Sections */
.form-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section h2 {
    color: #000;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #a4c866;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a4c866;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.field-info {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.required {
    color: #dc3545;
}

/* Question Blocks */
.question-block {
    margin-bottom: 30px;
}

.question-block:last-child {
    margin-bottom: 0;
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
}

.question-hint {
    font-size: 14px;
    font-weight: normal;
    color: #666;
    font-style: italic;
}

.question-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Answer Options */
.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}

.answer-option:hover {
    border-color: #a4c866;
    background: #f9fdf5;
}

.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #a4c866;
}

.answer-option input[type="radio"]:checked ~ .answer-text,
.answer-option input[type="checkbox"]:checked ~ .answer-text {
    font-weight: 600;
    color: #000;
}

.answer-option:has(input:checked) {
    border-color: #a4c866;
    background: #f0f8e8;
}

.answer-text {
    flex: 1;
    font-size: 16px;
    color: #333;
}

/* Form Actions */
.form-actions {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

/* reCAPTCHA Section */
.recaptcha-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.g-recaptcha {
    margin: 0 auto;
}

#recaptcha-error {
    margin-top: 10px;
    text-align: center;
}

.btn-submit {
    background: #a4c866;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-submit:hover {
    background: #8fb54d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .survey-container {
        padding: 10px;
    }
    
    .survey-header,
    .form-section,
    .form-actions {
        padding: 20px;
    }
    
    .survey-header h1 {
        font-size: 24px;
    }
    
    .form-section h2 {
        font-size: 20px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .answer-option {
        padding: 12px;
    }
    
    .btn-submit {
        width: 100%;
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
    }
    
    .survey-container {
        max-width: 100%;
    }
    
    .btn-submit {
        display: none;
    }
}
