/* =====================================================
   Aurora Pesquisa - Estilos Modernos
   Subdomínio: pesquisa.aurorapro.com.br
   ===================================================== */

:root {
    --primary-color: #7F56D9;
    --primary-dark: #6941C6;
    --primary-light: #E9D7FE;
    --secondary-color: #0EA5E9;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #E5E7EB;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* =====================================================
   Container Principal
   ===================================================== */

.survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   Header
   ===================================================== */

.survey-header {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.survey-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.survey-logo {
    width: 120px;
    height: auto;
    margin-bottom: 16px;
}

.survey-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.survey-company {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 16px;
}

.survey-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.survey-deadline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* =====================================================
   Progress Bar
   ===================================================== */

.progress-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 16px 24px;
    margin-bottom: 24px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.progress-label {
    color: var(--text-secondary);
}

.progress-count {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--bg-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* =====================================================
   Questões
   ===================================================== */

.question-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 28px;
    margin-bottom: 20px;
    transition: var(--transition);
    opacity: 1;
    transform: translateY(0);
}

.question-card:hover {
    box-shadow: var(--shadow-lg);
}

.question-card.hidden {
    display: none;
}

.question-card.error {
    border: 2px solid var(--error-color);
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-gradient);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.question-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.question-text .required {
    color: var(--error-color);
    font-size: 1rem;
}

.question-help {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 8px;
    display: none;
}

.question-card.error .error-message {
    display: block;
}

/* =====================================================
   NPS Scale (1-10)
   ===================================================== */

.nps-container {
    margin-top: 16px;
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nps-scale {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.nps-option {
    flex: 1;
    min-width: 44px;
    max-width: 60px;
}

.nps-option input {
    display: none;
}

.nps-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.nps-option label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.nps-option input:checked + label {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Cores por score NPS */
.nps-option input[value="1"]:checked + label,
.nps-option input[value="2"]:checked + label,
.nps-option input[value="3"]:checked + label,
.nps-option input[value="4"]:checked + label,
.nps-option input[value="5"]:checked + label,
.nps-option input[value="6"]:checked + label {
    background: var(--error-color);
    border-color: var(--error-color);
}

.nps-option input[value="7"]:checked + label,
.nps-option input[value="8"]:checked + label {
    background: var(--warning-color);
    border-color: var(--warning-color);
}

.nps-option input[value="9"]:checked + label,
.nps-option input[value="10"]:checked + label {
    background: var(--success-color);
    border-color: var(--success-color);
}

/* =====================================================
   Frequency / Satisfaction Scale
   ===================================================== */

.scale-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.scale-option {
    position: relative;
}

.scale-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.scale-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.scale-option label::before {
    content: '';
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
}

.scale-option input:checked + label {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.scale-option input:checked + label::before {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: inset 0 0 0 4px white;
}

.scale-option label:hover {
    border-color: var(--primary-color);
}

/* =====================================================
   Text Input
   ===================================================== */

.text-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    resize: vertical;
    transition: var(--transition);
    margin-top: 16px;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.text-input::placeholder {
    color: var(--text-muted);
}

/* =====================================================
   Multiple Choice (Checkbox)
   ===================================================== */

.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.checkbox-option {
    position: relative;
}

.checkbox-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-option label::before {
    content: '';
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-option input:checked + label {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.checkbox-option input:checked + label::before {
    border-color: var(--primary-color);
    background: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.checkbox-option label:hover {
    border-color: var(--primary-color);
}

/* =====================================================
   Submit Button
   ===================================================== */

.submit-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-top: 8px;
    text-align: center;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    padding: 16px 32px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn svg {
    width: 20px;
    height: 20px;
}

/* Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.submit-btn.loading .spinner {
    display: block;
}

.submit-btn.loading .btn-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   Status Pages (Error, Expired, Completed, Thank You)
   ===================================================== */

.status-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.status-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 48px;
    max-width: 480px;
    text-align: center;
}

.status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon.error {
    background: #FEE2E2;
    color: var(--error-color);
}

.status-icon.warning {
    background: #FEF3C7;
    color: var(--warning-color);
}

.status-icon.success {
    background: #D1FAE5;
    color: var(--success-color);
}

.status-icon svg {
    width: 40px;
    height: 40px;
}

.status-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.status-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.status-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =====================================================
   Footer
   ===================================================== */

.survey-footer {
    text-align: center;
    padding: 24px;
    margin-top: auto;
}

.survey-footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.survey-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.aurora-footer-logo {
    max-width: 100px;
    height: auto;
    margin-bottom: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.aurora-footer-logo:hover {
    opacity: 1;
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 640px) {
    .survey-container {
        padding: 12px;
    }
    
    .survey-header {
        padding: 24px 20px;
    }
    
    .survey-title {
        font-size: 1.375rem;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .nps-scale {
        gap: 6px;
    }
    
    .nps-option {
        min-width: 38px;
    }
    
    .nps-option label {
        height: 42px;
        font-size: 0.875rem;
    }
    
    .progress-container {
        position: relative;
        top: 0;
    }
    
    .status-card {
        padding: 32px 24px;
    }
}

/* =====================================================
   Animations
   ===================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card {
    animation: fadeInUp 0.5s ease forwards;
}

.question-card:nth-child(1) { animation-delay: 0.1s; }
.question-card:nth-child(2) { animation-delay: 0.15s; }
.question-card:nth-child(3) { animation-delay: 0.2s; }
.question-card:nth-child(4) { animation-delay: 0.25s; }
.question-card:nth-child(5) { animation-delay: 0.3s; }

/* Confetti animation for thank you page */
@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    top: -10px;
    animation: confetti 3s ease-in-out infinite;
}
