/* QE Satisfaction Survey Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Main Content */
.main {
    padding: 1.25rem 0 2rem;
}

.survey-card {
    position: relative;
    background: white;
    border: 1px solid #d1d9e6;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.survey-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.survey-header .logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.survey-header .subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.survey-intro {
    font-size: 1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.survey-header h2 {
    font-size: 2rem;
    color: #34495e;
    margin-bottom: 1rem;
    font-weight: 600;
}

.survey-header h2 i {
    color: #f39c12;
    margin-right: 0.5rem;
}

.survey-header p {
    font-size: 1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Bar */
.progress-bar {
    background: #ecf0f1;
    border-radius: 20px;
    height: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #e74c3c 0%, #f39c12 25%, #f1c40f 50%, #2ecc71 75%, #27ae60 100%);
    height: 100%;
    border-radius: 20px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Question Groups */
.question-group {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border: 2px solid #f8f9fa;
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

.question-group:hover {
    border-color: #e9ecef;
}

.question-group h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.question-number {
    display: inline-block;
    background: #3498db;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.9rem;
    margin-right: 0.8rem;
    font-weight: 600;
}

/* Rating Scale */
.rating-scale {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.rating-scale.vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rating-option {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-label {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f4f6f9;
    border: 2px solid #d1d9e6;
    font-size: 1.2rem;
    font-weight: bold;
    color: #34495e;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rating-label:hover {
    background: #eaf1f8;
    border-color: #a6b8d4;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.rating-label:active {
    transform: scale(1.05);
}

.rating-option input:checked + .rating-label {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    transform: scale(1.15);
}

/* Rating Colors */
.rating-1 {
    border-color: #e74c3c;
    color: #e74c3c;
}

.rating-1:hover {
    background: #fdedec;
    border-color: #c0392b;
}

.rating-2 {
    border-color: #e67e22;
    color: #e67e22;
}

.rating-2:hover {
    background: #fdeee4;
    border-color: #d35400;
}

.rating-3 {
    border-color: #f39c12;
    color: #f39c12;
}

.rating-3:hover {
    background: #fef5e7;
    border-color: #e67e22;
}

.rating-4 {
    border-color: #2ecc71;
    color: #2ecc71;
}

.rating-4:hover {
    background: #eafaf1;
    border-color: #27ae60;
}

.rating-5 {
    border-color: #27ae60;
    color: #27ae60;
}

.rating-5:hover {
    background: #e8f8f5;
    border-color: #229954;
}

/* Selected State */
.rating-option input:checked + .rating-1 {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;
    transform: scale(1.05);
}

.rating-option input:checked + .rating-2 {
    background: #e67e22;
    color: white;
    border-color: #d35400;
    transform: scale(1.05);
}

.rating-option input:checked + .rating-3 {
    background: #f39c12;
    color: white;
    border-color: #e67e22;
    transform: scale(1.05);
}

.rating-option input:checked + .rating-4 {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
    transform: scale(1.05);
}

.rating-option input:checked + .rating-5 {
    background: #27ae60;
    color: white;
    border-color: #229954;
    transform: scale(1.05);
}

/* Feedback Section */
.question-group h3 i {
    margin-right: 0.5rem;
    color: #3498db;
}

.question-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    margin-top: 0.5rem;
    transition: border-color 0.3s ease;
}

.question-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.character-count {
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Contact Fields */
.contact-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-input {
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.contact-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Submit Section */
.submit-section {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f8f9fa;
}

.submit-btn {
    background: #1abc9c;
    border: none;
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    transition: background 0.3s ease;
    margin-bottom: 1rem;
    min-width: 200px;
}

.submit-btn:hover {
    background: #16a085;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.privacy-note {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.privacy-note i {
    color: #27ae60;
    margin-right: 0.5rem;
}

/* Submit loading overlay */
.survey-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 16px;
}

.survey-loading.hidden {
    display: none;
}

.survey-loading-content {
    text-align: center;
    padding: 2rem;
    max-width: 320px;
}

.survey-loading-content i {
    font-size: 2.5rem;
    color: #1abc9c;
    margin-bottom: 1rem;
}

.survey-loading-content h3 {
    font-size: 1.35rem;
    color: #2c3e50;
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.survey-loading-content p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 3rem 2rem;
}

.success-message.hidden {
    display: none;
}

.success-content i {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 1.5rem;
}

.success-content h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.success-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.return-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.25;
    transition: all 0.3s ease;
}

.return-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.return-btn i {
    margin: 0;
    line-height: 1;
    font-size: 0.95em;
}

/* Error Message */
.error-message {
    background: #fff5f5;
    border: 2px solid #fed7d7;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: none;
}

.error-content {
    text-align: center;
}

.error-content i {
    font-size: 2rem;
    color: #e53e3e;
    margin-bottom: 1rem;
}

.error-content h3 {
    color: #e53e3e;
    margin-bottom: 0.5rem;
}

.error-content p {
    color: #666;
    margin-bottom: 1rem;
}

.error-dismiss {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.error-dismiss:hover {
    background: #c53030;
}

/* Footer */
.footer {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .survey-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .survey-header .logo {
        font-size: 1.5rem;
    }
    
    .rating-scale {
        grid-template-columns: 1fr;
    }
    
    .rating-label {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .question-group {
        padding: 1rem;
    }
    
    .contact-fields {
        grid-template-columns: 1fr;
    }
    
    .submit-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .main {
        padding-top: 0.75rem;
    }

    .survey-header .logo {
        font-size: 1.35rem;
    }

    .survey-header .subtitle {
        font-size: 0.95rem;
    }
    
    .survey-card {
        padding: 1rem;
    }
    
    .question-group {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .question-group h3 {
        font-size: 1rem;
    }
    
    .rating-label {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}