/* Ogólne */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.quiz-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Górny pasek */

.quiz-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.quiz-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.quiz-header-title {
    font-weight: 600;
    font-size: 15px;
}

.quiz-header-progress {
    font-size: 14px;
    color: #4b5563;
}

/* Główna zawartość */

.quiz-main {
    display: flex;
    justify-content: center;
    padding: 32px 16px 48px;
}

.quiz-card {
    width: 100%;
    max-width: 960px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    padding: 28px 32px 32px;
}

@media (max-width: 768px) {
    .quiz-card {
        padding: 20px 16px 24px;
        border-radius: 0;
        box-shadow: none;
    }

    .quiz-header {
        padding-inline: 16px;
    }
}

/* Nagłówek quizu */

.quiz-title {
    margin: 0 0 4px;
    font-size: 24px;
    text-align: center;
}

.quiz-subtitle {
    margin: 0 0 20px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

/* Sekcje */

.quiz-section {
    margin-top: 24px;
}

.quiz-section-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
}

/* Siatka pól */

.quiz-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .quiz-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Pola formularza */

.quiz-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quiz-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.quiz-input {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 9px 11px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.quiz-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
    background: #f9fafb;
}

.quiz-help {
    margin: 4px 0 0;
    font-size: 11px;
    color: #9ca3af;
}

/* Komunikaty */

.quiz-alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 12px;
}

.quiz-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.quiz-error-text {
    margin-top: 6px;
    font-size: 12px;
    color: #b91c1c;
}

/* Karty pytań */

.question-card {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.question-card--error {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15);
}

.question-card--error .question-text {
    color: #991b1b;
}

.question-error-note {
    margin-top: 10px;
    font-size: 12px;
    color: #b91c1c;
    display: none;
    align-items: center;
    gap: 6px;
}

.question-card--error .question-error-note {
    display: flex;
}

.question-card-header {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 10px;
}

.question-number {
    font-weight: 600;
    color: #6b7280;
}

.question-text {
    font-weight: 500;
    color: #111827;
}

/* Odpowiedzi */

.question-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.answer-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    background: #ffffff;
}

.answer-option:hover {
    background: #eff6ff;
}

.answer-option--selected {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.answer-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.answer-bullet {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #9ca3af;
    flex-shrink: 0;
    position: relative;
}

.answer-option--selected .answer-bullet {
    border-color: #2563eb;
}

.answer-option--selected .answer-bullet::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 999px;
    background: #2563eb;
}

.answer-text {
    font-size: 14px;
    color: #111827;
}

/* Stopka */

.quiz-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.quiz-submit-btn {
    width: 100%;
    background-color: #2563eb; /* bg-blue-600 */
    border-color: transparent;
    color: white; /* text-white */
    font-weight: 700; /* font-bold */
    padding-top: 1rem; /* py-4 */
    padding-bottom: 1rem;
    padding-left: 1.5rem; /* px-6 */
    padding-right: 1.5rem;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    display: flex;
    align-items: center;
    justify-content: center;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.quiz-submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 14px 25px rgba(37, 99, 235, 0.35);
}

.quiz-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.quiz-input-error {
    border-color: #b91c1c !important;
    background: #fef2f2;
}


/* ==========================
   SARA Quiz – strona podziękowań
   ========================== */

.quiz-body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f7fb;
}

/* Kontener na całą stronę, centrowanie w pionie i poziomie */
.quiz-thankyou-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Karta z podziękowaniami */
.quiz-thankyou-card {
    background: #ffffff;
    padding: 40px 60px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
    animation: quiz-thankyou-fade-in 0.25s ease-out;
}

/* Ikona z ptaszkiem */
.quiz-thankyou-icon {
    width: 60px;
    height: 60px;
    border-radius: 999px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d8f5d0;
    color: #2f9e44;
    font-size: 32px;
}

/* Teksty */
.quiz-thankyou-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #1e293b;
    font-weight: 700;
}

.quiz-thankyou-text {
    margin: 0;
    font-size: 16px;
    color: #64748b;
}

/* Prosta animacja wejścia */
@keyframes quiz-thankyou-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- REGULAMIN / CHECKBOX --- */

.quiz-consent {
    margin: 25px 0 15px 0;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.quiz-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
    color: #374151;
}

.quiz-consent-checkbox {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #2563eb; /* niebieskie zaznaczenie, spójne z twoimi przyciskami */
}

.quiz-consent-label a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.quiz-consent-label a:hover {
    text-decoration: underline;
}

/* Błąd walidacji – jeśli kiedyś chcesz go podkreślać */
.quiz-consent--error {
    border-color: #dc2626;
    background: #fef2f2;
}

.quiz-consent--error .quiz-consent-label {
    color: #b91c1c;
}
