/* ===== Halaman Kuisioner & Pendaftaran Berhasil ===== */

.kuis-body {
    margin: 0;
    background-color: #fde0de;
    color: #2b2b2b;
}

/* Satu layar penuh tanpa scroll — hanya saat JavaScript aktif.
   Tanpa JS semua pertanyaan tampil bertumpuk, jadi halaman harus tetap bisa di-scroll. */
.kuis-body.js-aktif {
    height: 100vh;   /* cadangan untuk browser lama */
    height: 100dvh;  /* tinggi layar HP yang sebenarnya (tanpa address bar) */
    overflow: hidden;
}

/* --- Header --- */
.kuis-header {
    height: 64px;
    background: #fff;
    display: flex;
    align-items: center;
}

.kuis-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* logo kiri, progress tepat di tengah */
    align-items: center;
}

.kuis-header__logo {
    display: block;
    height: 28px;
    width: auto;
}

.kuis-progress {
    width: 200px;
}

.kuis-progress__label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.kuis-progress__bar {
    height: 4px;
    border-radius: 2px;
    background: #dddddd;
    overflow: hidden;
}

.kuis-progress__fill {
    height: 100%;
    width: 20%;
    background: #b6192a;
    transition: width 0.3s ease;
}

/* --- Area utama --- */
.kuis-main {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 64px);
    padding: 40px 0 96px;
}

.js-aktif .kuis-main {
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    min-height: 0;
    overflow-y: auto; /* cadangan: layar sangat pendek / keyboard HP terbuka */
}

.kuis-main > .container {
    position: relative; /* di atas ornamen */
}

/* Ornamen kiri — ekspor dari Figma sebagai SVG/PNG transparan */
.kuis-ornamen {
    position: absolute;
    inset: 0 50% 0 0;
    background: url('../img/kuisioner/ornamen.svg') center / contain no-repeat;
    pointer-events: none;
}

/* --- Isi tiap pertanyaan --- */
.kuis-step__eyebrow {
    color: #b6192a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.kuis-step__intro {
    font-size: 16px;
    margin-bottom: 2px;
}

.kuis-step__question {
    font-size: clamp(28px, 22.55px + 1.45vw, 40px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.kuis-kembali {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: #b6192a;
    font-size: 13px;
    margin-bottom: 20px;
}

.kuis-kembali:hover {
    text-decoration: underline;
}

.kuis-label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.kuis-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    font-size: 16px; /* 16px: HP tidak auto-zoom saat input diklik */
}

.kuis-input:focus {
    outline: none;
    border-color: #b6192a;
}

.kuis-input::placeholder {
    color: #b5b5b5;
}

/* --- Tanggal lahir (3 kotak) --- */
.kuis-tanggal {
    display: grid;
    grid-template-columns: repeat(2, 90px) 110px;
    gap: 12px;
}

.kuis-input--tanggal {
    text-align: center;
    height: 56px;
}

.kuis-note {
    font-size: 12px;
    margin: 12px 0 0;
}

/* --- Pilihan (radio yang tampil sebagai tombol) --- */
.kuis-pilihan {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.kuis-opsi {
    position: relative;
    margin: 0;
    cursor: pointer;
}

/* Radio aslinya disembunyikan, tapi tetap bisa difokus keyboard */
.kuis-opsi input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kuis-opsi span {
    display: block;
    padding: 22px 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: #b6192a;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.kuis-opsi:hover span {
    border-color: #f2a5ab;
}

.kuis-opsi input:checked + span {
    background: #b6192a;
    border-color: #b6192a;
    color: #fff;
}

.kuis-opsi input:focus-visible + span {
    outline: 3px solid rgba(182, 25, 42, 0.35);
    outline-offset: 2px;
}

/* Varian pilihan tujuan: kotak lebih pendek, teks gelap */
.kuis-pilihan--kecil .kuis-opsi span {
    padding: 14px 12px;
    color: #2b2b2b;
    font-size: 14px;
}

/* --- Pesan error --- */
.kuis-error {
    color: #b6192a;
    font-size: 13px;
    font-weight: 600;
    margin: 10px 0 0;
}

.kuis-error:empty {
    display: none;
}

/* --- Tombol Daftar & teks persetujuan --- */
.kuis-daftar {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 44px;
    border: 0;
    border-radius: 999px;
    background: #b6192a;
    color: #fff;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.kuis-daftar:hover {
    background: #930010;
}

.kuis-daftar:disabled {
    opacity: 0.7;
    cursor: wait;
}

.kuis-legal {
    font-size: 11px;
    line-height: 1.5;
    margin: 16px 0 0;
}

.kuis-legal a {
    color: inherit;
}

/* --- Tombol lanjut (lingkaran merah kanan bawah) --- */
.kuis-lanjut {
    position: absolute;
    right: 40px;
    bottom: 40px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #c8102e;
    color: #fff;
    font-size: 20px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.kuis-lanjut:hover {
    background: #930010;
    transform: translateX(3px);
}

.kuis-lanjut[hidden] {
    display: none; /* [hidden] kalah oleh display: grid di atas */
}

/* ===== Halaman berhasil ===== */
.kuis-main--berhasil {
    background: url('../img/kuisioner/ornamen-berhasil.svg') center / cover no-repeat;
}

.kuis-berhasil {
    text-align: center;
}

.kuis-berhasil__title {
    font-size: clamp(36px, 26.91px + 2.42vw, 56px);
    font-weight: 800;
    margin-bottom: 12px;
}

.kuis-berhasil__text {
    font-size: clamp(16px, 14.18px + 0.48vw, 20px);
    margin-bottom: 28px;
}

.kuis-berhasil__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.kuis-btn {
    display: inline-block;
    padding: 10px 28px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.kuis-btn--merah {
    background: #b6192a;
    color: #fff;
}

.kuis-btn--merah:hover {
    background: #930010;
    color: #fff;
}

.kuis-btn--putih {
    background: #fff;
    color: #2b2b2b;
}

.kuis-btn--putih:hover {
    background: #f3f3f3;
    color: #2b2b2b;
}

/* ===== HP ===== */
@media (max-width: 991.98px) {
    .kuis-ornamen {
        inset: 0;
        opacity: 0.35; /* ornamen tetap ada, tapi samar di belakang pertanyaan */
    }
}

@media (max-width: 575.98px) {
    .kuis-progress { width: 120px; }
    .kuis-header__logo { height: 24px; }
    .kuis-main { padding: 24px 0 88px; }
    .kuis-lanjut { right: 20px; bottom: 20px; }
    .kuis-tanggal { grid-template-columns: 1fr 1fr 1.3fr; }
}
