/* WULF Anniversary Running — shared styles for all public pages
   (index, payment, mandiriQris, receipt). Standalone page (see
   resources/views/wulfAnniversary/layout.blade.php) — NOT loaded on top of
   the shared Bootstrap "master" layout, so this file owns the full reset,
   typography, and background.

   Dedicated dark navy/gold sub-brand for this event (matches the
   "WULF RUNiversary — Hunt Your Limit" logo), distinct from the light/warm
   theme used on the main landing page:
     - background : navy  #0e1b32
     - content    : white #ffffff
     - highlight  : gold  #fac817

   Mobile-first: base rules target small screens, larger screens are
   progressively enhanced via min-width media queries. */

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

:root {
    --navy: #0e1b32;
    --navy-light: #16274a;
    --gold: #fac817;
    --gold-soft: #ffe17a;
    --text: #ffffff;
    --text-sub: rgba(255, 255, 255, 0.82);
    --text-light: rgba(255, 255, 255, 0.6);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-shadow: rgba(0, 0, 0, 0.25);
    --danger: #ff6b6b;
}

html {
    /* Belt-and-suspenders: nothing here is meant to overflow horizontally,
       but a long unbroken string (e.g. external_id) or a rogue fixed width
       shouldn't ever be able to force a sideways scrollbar on mobile. */
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 500;
    background: var(--navy);
    color: var(--text);
    min-height: 100vh;
    /* Sengaja TIDAK overflow-x:hidden di sini juga — html sudah menanganinya.
       Kalau di-set di body juga, browser otomatis mengubah overflow-y body
       jadi "auto" (aturan CSS: salah satu sumbu non-visible memaksa sumbu
       lain keluar dari "visible"), sehingga body jadi scroll container
       tersendiri yang terpisah dari scroll asli di html/viewport. Akibatnya
       semua position:sticky di dalam body (misal .wulf-anniv-summary-card)
       jadi tidak nempel sama sekali karena dihitung relatif ke scrollport
       body yang diam, bukan ke scroll viewport yang sebenarnya berjalan. */
    /* Teks putih tipis di atas background gelap gampang terlihat "kabur"/kurang
       tajam tanpa ini — bukan soal warna, tapi rendering anti-aliasing font. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.wulf-bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(165deg, #0e1b32 0%, #16274a 45%, #0e1b32 100%);
}

/* Halftone dot bursts radiating from two opposite corners (gold top-left,
   white bottom-right) — dots actually shrink toward the edge of each burst
   (pre-rendered SVGs), not just a uniform grid fading via opacity. */
.wulf-bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        url('/assets/img/wulf-anniversary/halftone-gold.svg'),
        url('/assets/img/wulf-anniversary/halftone-white.svg');
    background-repeat: no-repeat, no-repeat;
    background-position: top left, bottom right;
    background-size: min(70vw, 900px) auto, min(70vw, 900px) auto;
}

.wulf-page-shell {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wulf-topbar {
    display: flex;
    justify-content: center;
    padding: 20px 0 8px;
}

.wulf-topbar-logo {
    height: 130px;
    width: auto;
    display: block;
    /* Lift the logo off the busy halftone background so it stays readable. */
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

.wulf-footer {
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
}

.wulf-footer p {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

/* Narrow variant for single-column pages (payment, QRIS mandiri, receipt) */
.wulf-narrow {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}

.wulf-alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 13px;
}

.wulf-alert-error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.35);
    color: var(--danger);
}

.wulf-anniv-empty {
    text-align: center;
    padding: 40px 16px 60px;
}

.wulf-anniv-empty h2 {
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 10px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.wulf-anniv-empty p {
    color: var(--text-sub);
    font-size: 14px;
}

.wulf-anniv-banner {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

.wulf-anniv-banner img {
    width: 100%;
    display: block;
}

.wulf-anniv-header {
    text-align: center;
    margin-bottom: 20px;
}

.wulf-anniv-header h1,
.wulf-payment-title {
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 900;
    letter-spacing: 0.5px;
    color: var(--gold);
    margin-bottom: 8px;
    line-height: 1.25;
    /* Just enough dark shadow to keep it legible over the busy halftone
       background — no glow, that read as flashy/artificial. */
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.wulf-payment-title {
    text-align: center;
    margin-bottom: 20px;
}

.wulf-anniv-meta {
    display: flex;
    gap: 6px 20px;
    flex-wrap: wrap;
    justify-content: center;
    color: var(--text-sub);
    font-size: 13px;
}

.wulf-anniv-meta i {
    color: var(--gold);
    margin-right: 6px;
}

/* Mobile-first: single column, form first then order summary/payment below it */
.wulf-anniv-grid,
.wulf-payment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.wulf-anniv-form-card,
.wulf-anniv-summary-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 4px 20px var(--glass-shadow);
}

.wulf-anniv-form-card h3,
.wulf-anniv-summary-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}

.wulf-anniv-note {
    color: var(--text-sub);
    font-size: 13px;
    margin-top: 4px;
}

/* Styling untuk konten HTML dari TinyMCE (Deskripsi & Syarat/Ketentuan di admin
   Pengaturan Event) — heading, list bersarang (mis. "1. ... " lalu "1. 2. 3."
   di dalamnya), bold, dan link, disesuaikan ke tema navy/gold. */
.wulf-prose {
    color: var(--text-sub);
    line-height: 1.75;
    font-size: 14px;
    margin-bottom: 20px;
}

.wulf-prose:last-child {
    margin-bottom: 0;
}

.wulf-prose p {
    margin: 0 0 14px;
}

/* Font-size eksplisit di sini penting — tanpa ini h3/h4 jatuh ke ukuran
   default browser (~18-24px) yang, dikombinasi bold+gold, kelihatan
   "berteriak" tiap kali muncul berulang untuk banyak poin bernomor di
   dokumen S&K yang panjang. Border bawah tipis dipakai sebagai pembatas
   visual antar section, gantinya lompatan ukuran besar. */
.wulf-prose h1,
.wulf-prose h2,
.wulf-prose h3 {
    font-size: 15px;
    color: var(--gold);
    font-weight: 700;
    line-height: 1.5;
    margin: 22px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(250, 200, 23, 0.2);
}

.wulf-prose h4 {
    font-size: 14px;
    color: var(--gold-soft);
    font-weight: 700;
    line-height: 1.5;
    margin: 16px 0 6px;
}

.wulf-prose h1:first-child,
.wulf-prose h2:first-child,
.wulf-prose h3:first-child,
.wulf-prose h4:first-child {
    margin-top: 0;
}

.wulf-prose strong,
.wulf-prose b {
    color: var(--text);
    font-weight: 700;
}

.wulf-prose a {
    color: var(--gold);
    text-decoration: underline;
}

.wulf-prose ul,
.wulf-prose ol {
    margin: 0 0 14px;
    padding-left: 24px;
}

.wulf-prose ul ul,
.wulf-prose ul ol,
.wulf-prose ol ul,
.wulf-prose ol ol {
    margin-top: 6px;
    margin-bottom: 6px;
}

.wulf-prose li {
    margin-bottom: 6px;
}

.wulf-prose li::marker {
    color: var(--gold);
    font-weight: 700;
}

/* Satu kartu = data diri 1 peserta (1 tiket). Form bisa punya banyak kartu ini
   sekaligus lewat tombol "Tambah Peserta". */
.wulf-participant-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 4px 20px var(--glass-shadow);
}

.wulf-participant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.wulf-participant-title {
    font-weight: 800;
    color: var(--gold);
    font-size: 15px;
}

.wulf-participant-remove {
    background: none;
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: var(--danger);
    border-radius: 100px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.wulf-participant-remove:hover {
    background: rgba(255, 107, 107, 0.12);
}

.wulf-btn-add-participant {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px dashed var(--glass-border);
    border-radius: 16px;
    background: transparent;
    color: var(--gold);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.wulf-btn-add-participant:hover {
    border-color: var(--gold);
    background: rgba(250, 200, 23, 0.06);
}

.wulf-summary-meta {
    color: var(--text-sub);
    font-size: 13px;
    margin-bottom: 4px;
}

.wulf-summary-meta i {
    color: var(--gold);
}

.wulf-anniv-summary-card h4 {
    margin-top: 18px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wulf-field {
    margin-bottom: 14px;
}

.wulf-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text);
}

.req {
    color: var(--danger);
}

.wulf-field input,
.wulf-field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    /* 16px prevents iOS Safari auto-zoom on focus */
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wulf-field select option {
    background: var(--navy-light);
    color: var(--text);
}

.wulf-field input::placeholder {
    color: var(--text-light);
}

.wulf-field input:focus,
.wulf-field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(250, 200, 23, 0.2);
}

.wulf-err {
    color: var(--danger);
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.wulf-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wulf-ticket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    gap: 10px;
    transition: border-color 0.2s, background 0.2s;
}

.wulf-ticket-item:has(input:checked) {
    border-color: var(--gold);
    background: rgba(250, 200, 23, 0.1);
    box-shadow: 0 2px 8px rgba(250, 200, 23, 0.12);
}

.wulf-ticket-name {
    flex: 1;
    margin-left: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.wulf-ticket-price {
    color: var(--gold);
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.wulf-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.wulf-qty-row label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.wulf-qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wulf-qty-control button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
}

.wulf-qty-control input {
    width: 36px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
}

.wulf-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
    font-size: 15px;
    color: var(--text);
}

.wulf-total-row strong {
    color: var(--gold);
    /* external_id (e.g. WULF-ANNIV-1786350509-iJ9sIt) is a long unbroken
       string — force-wrap it instead of overflowing on narrow screens. */
    overflow-wrap: anywhere;
    text-align: right;
}

.wulf-btn-submit {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 16px;
    border: none;
    border-radius: 100px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(250, 200, 23, 0.3);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.wulf-btn-submit:hover {
    color: var(--navy);
    background: var(--gold-soft);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 200, 23, 0.4);
}

/* Payment method selection */
.wulf-payment-method {
    margin-bottom: 12px;
}

.wulf-method-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, transform 0.2s;
    font-family: inherit;
}

.wulf-method-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.wulf-method-name {
    font-weight: 800;
    font-size: 15px;
    color: var(--gold);
}

.wulf-method-desc {
    font-size: 12px;
    color: var(--text-sub);
}

.wulf-countdown {
    margin-top: 16px;
    text-align: center;
    color: var(--danger);
    font-weight: 700;
    font-size: 14px;
}

/* Desktop enhancements */
@media (min-width: 900px) {
    .wulf-page-shell {
        padding: 0 24px 60px;
    }

    .wulf-topbar {
        padding: 28px 0 16px;
    }

    .wulf-topbar-logo {
        height: 180px;
    }

    .wulf-anniv-grid {
        grid-template-columns: 1.6fr 1fr;
        align-items: start;
        gap: 24px;
    }

    .wulf-payment-grid {
        grid-template-columns: 1.4fr 1fr;
        align-items: start;
        gap: 24px;
    }

    .wulf-anniv-form-card,
    .wulf-anniv-summary-card {
        padding: 28px;
    }

    /* Sticky summary only makes sense once the two-column layout is active —
       on mobile (single column) a sticky sidebar would float awkwardly
       mid-scroll over the form. */
    .wulf-anniv-summary-card {
        position: sticky;
        top: 24px;
    }
}
