/* ESN Surveys - Light Minimalistic Theme */
/* Ultra-thin fonts, clean Next.js/Tailwind aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600&display=swap');

:root {
    --primary: #0A1633;
    --accent: #0ea5e9;
    --accent-light: #e0f2fe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gray);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* Header */
.survey-header {
    text-align: center;
    margin-bottom: 48px;
}

.survey-logo {
    height: 48px;
    margin-bottom: 32px;
}

.survey-header h1 {
    font-size: 1.75rem;
    font-weight: 200;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.survey-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

/* Progress Bar */
.progress-bar {
    background: var(--border);
    border-radius: 100px;
    height: 4px;
    margin-bottom: 48px;
    overflow: hidden;
}

.progress-fill {
    background: var(--accent);
    height: 100%;
    border-radius: 100px;
    transition: width 0.4s ease;
}

/* Survey Card */
.survey-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s ease;
}

.survey-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.survey-card.respondent-info {
    border-left: 3px solid var(--accent);
}

/* Section Title */
.section-title {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .icon {
    width: 32px;
    height: 32px;
    background: var(--accent-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.875rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.form-group .question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--text-primary);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 12px;
    flex-shrink: 0;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 300;
    font-family: inherit;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 300;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Rating Scale */
.rating-scale {
    display: flex;
    gap: 8px;
}

.rating-option {
    flex: 1;
}

.rating-option input {
    display: none;
}

.rating-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-bottom: 0;
}

.rating-option label:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.rating-option input:checked+label {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.rating-option input:checked+label .rating-label {
    color: rgba(255, 255, 255, 0.9);
}

.rating-option .rating-value {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.rating-option .rating-label {
    font-size: 0.625rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* NPS Scale */
.nps-scale {
    display: flex;
    gap: 6px;
}

.nps-option {
    flex: 1;
}

.nps-option input {
    display: none;
}

.nps-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.nps-option label:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.nps-option input:checked+label {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Matrix Rating Table */
.matrix-rating {
    width: 100%;
    border-collapse: collapse;
}

.matrix-rating thead th {
    padding: 12px 8px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    text-align: center;
}

.matrix-rating thead th:first-child {
    text-align: left;
    width: 40%;
}

.matrix-rating tbody tr {
    border-bottom: 1px solid var(--border-light);
}

.matrix-rating tbody tr:last-child {
    border-bottom: none;
}

.matrix-rating tbody td {
    padding: 16px 8px;
    text-align: center;
    vertical-align: middle;
}

.matrix-rating tbody td:first-child {
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-primary);
}

.matrix-rating .matrix-radio {
    display: none;
}

.matrix-rating .matrix-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    margin: 0;
}

.matrix-rating .matrix-label:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.matrix-rating .matrix-radio:checked+.matrix-label {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

/* Matrix header labels */
.matrix-header-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    margin-bottom: 8px;
}

.matrix-header-labels span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Yes/No Toggle */
.toggle-group {
    display: flex;
    gap: 12px;
}

.toggle-option input {
    display: none;
}

.toggle-option label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.toggle-option label:hover {
    border-color: var(--accent);
}

.toggle-option input:checked+label {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.conditional-field {
    display: none;
    margin-top: 16px;
    padding-left: 16px;
    border-left: 2px solid var(--border);
}

.conditional-field.visible {
    display: block;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--text-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.9375rem;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.submit-btn:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.survey-footer {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 300;
}

.survey-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.survey-footer a:hover {
    color: var(--accent);
}

/* Thank You Page */
.thank-you-container {
    text-align: center;
    padding: 60px 20px;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    font-size: 2rem;
    color: white;
}

.thank-you-container h1 {
    font-size: 2rem;
    font-weight: 200;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.thank-you-container p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 32px 16px;
    }

    .survey-card {
        padding: 24px;
    }

    .survey-header h1 {
        font-size: 1.5rem;
    }

    .rating-scale {
        flex-wrap: wrap;
    }

    .rating-option {
        flex: 0 0 calc(20% - 6px);
        min-width: 54px;
    }

    .nps-scale {
        flex-wrap: wrap;
    }

    .nps-option {
        flex: 0 0 calc(16.66% - 5px);
    }

    .rating-option .rating-label {
        display: none;
    }
}