/* ============================================================
   events-frontend.css
   Part of GBI Slawi Frontend CSS — Events Public Page
   ============================================================ */

/* ══════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════ */
.ev-hero {
    background: var(--bg);
    padding: 110px 24px 72px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Dekorasi latar belakang */
.ev-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201, 168, 76, .1) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(201, 168, 76, .05) 0%, transparent 60%);
    pointer-events: none;
}

.ev-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border, rgba(201, 168, 76, .25)), transparent);
}

.ev-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: auto;
}

.ev-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gold-dim);
    border: 1px solid var(--gold-border, rgba(201, 168, 76, .25));
    color: var(--gold);
    padding: 5px 16px;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.ev-hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
    letter-spacing: .04em;
    line-height: 1.15;
}

.ev-hero-title span {
    color: var(--gold);
}

.ev-hero-sub {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.7;
    margin: 0;
    max-width: 520px;
    margin-inline: auto;
}

/* ══════════════════════════════════════════════
   SECTION & GRID
   ══════════════════════════════════════════════ */
.ev-section {
    padding: 56px 24px 96px;
    background: var(--bg);
}

.ev-container {
    max-width: 1100px;
    margin: auto;
}

.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}

/* ══════════════════════════════════════════════
   EVENT CARD
   ══════════════════════════════════════════════ */
.ev-card {
    background: var(--panel, #111622);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .22s, border-color .22s, box-shadow .22s;
}

/* Gold top accent line */
.ev-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity .22s;
}

.ev-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 168, 76, .4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3), 0 0 0 1px rgba(201, 168, 76, .1);
}

.ev-card:hover::before {
    opacity: 1;
}

/* Tanggal header */
.ev-card-date {
    background: linear-gradient(135deg, #0A0D14 0%, rgba(201, 168, 76, .12) 100%);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px 24px;
    gap: 2px;
    position: relative;
    overflow: hidden;
}

.ev-card-date::after {
    content: '✝';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6rem;
    color: var(--gold);
    opacity: .12;
}

.ev-date-day {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.ev-date-mon {
    font-size: .68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-top: 2px;
}

/* Card body */
.ev-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.ev-card-title {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
    letter-spacing: .02em;
}

.ev-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
}

.ev-card-meta svg {
    color: var(--gold);
    opacity: .7;
    flex-shrink: 0;
}

.ev-card-desc {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.65;
    margin: 4px 0 0;
    flex: 1;
}

.ev-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border2);
}

/* Baris 1: Detail (full width) */
.ev-card-actions-top {
    display: flex;
}

.ev-card-actions-top .ev-btn {
    flex: 1;
    justify-content: center;
}

/* Baris 2: Panitia + Donasi sejajar */
.ev-card-actions-bottom {
    display: flex;
    gap: 8px;
}

.ev-card-actions-bottom .ev-btn {
    flex: 1;
    justify-content: center;
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.ev-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    font-family: 'Lato', sans-serif;
}

.ev-btn:disabled {
    opacity: .6;
    cursor: default;
}

/* Outline */
.ev-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.ev-btn-outline:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-dim);
}

/* Panitia */
.ev-btn-panitia {
    background: var(--gold-dim);
    border: 1px solid rgba(201, 168, 76, .35);
    color: var(--gold);
}

.ev-btn-panitia:hover:not(:disabled) {
    background: rgba(201, 168, 76, .22);
    border-color: var(--gold);
}

/* Registered */
.ev-btn-registered {
    background: rgba(76, 175, 130, .12);
    border: 1px solid rgba(76, 175, 130, .3);
    color: var(--success);
    cursor: default;
}

/* Donasi */
.ev-btn-donasi {
    background: linear-gradient(135deg, #B8922A, var(--gold));
    color: #0A0D14;
    font-weight: 700;
}

.ev-btn-donasi:hover:not(:disabled) {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, .28);
}

/* Primary */
.ev-btn-primary {
    background: var(--gold);
    color: #0A0D14;
    font-weight: 700;
}

.ev-btn-primary:hover {
    opacity: .9;
}

/* Confirm (green) */
.ev-btn-donasi-konfirm {
    background: linear-gradient(135deg, #2D9160, var(--success));
    color: #fff;
    font-weight: 700;
}

.ev-btn-donasi-konfirm:hover:not(:disabled) {
    opacity: .9;
    transform: translateY(-1px);
}

.ev-btn-donasi-konfirm:disabled {
    opacity: .5;
    cursor: default;
}

/* ══════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════ */
.ev-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--muted);
}

.ev-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: .5;
}

.ev-empty h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--text);
    margin: 0 0 10px;
    letter-spacing: .04em;
}

.ev-empty p {
    font-size: .84rem;
    line-height: 1.65;
}

/* ══════════════════════════════════════════════
   OVERLAY & MODAL
   ══════════════════════════════════════════════ */
.ev-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.ev-overlay.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

@keyframes evOverlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ev-modal {
    background: var(--panel, #111622);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
    position: relative;
    max-height: 88vh;
    overflow-y: auto;
    animation: evModalIn .22s cubic-bezier(.25, .46, .45, .94);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .6), 0 0 0 1px rgba(201, 168, 76, .08);
}

/* Gold line di atas modal */
.ev-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 12px 12px 0 0;
}

.ev-modal-sm {
    max-width: 400px;
    text-align: center;
}

.ev-modal-detail {
    max-width: 600px;
}

.ev-modal-donasi {
    max-width: 460px;
}

@keyframes evModalIn {
    from {
        opacity: 0;
        transform: scale(.94) translateY(14px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ev-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--gold-dim);
    border: 1px solid var(--border);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--muted);
    font-size: .82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s, border-color .15s;
}

.ev-modal-close:hover {
    color: var(--text);
    background: var(--gold-dim2);
    border-color: var(--gold);
}

.ev-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--gold-dim);
    border: 1px solid rgba(201, 168, 76, .25);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.ev-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 18px;
    line-height: 1.3;
    letter-spacing: .03em;
    padding-right: 28px;
}

.ev-modal-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
    display: block;
}

.ev-modal-metas {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: var(--gold-dim);
    border: 1px solid var(--border2);
    border-radius: 6px;
}

.ev-modal-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--muted);
}

.ev-modal-meta-row svg {
    color: var(--gold);
    flex-shrink: 0;
    opacity: .8;
}

.ev-modal-desc-short {
    color: var(--text);
    font-size: .88rem;
    line-height: 1.7;
}

.ev-modal-divider {
    border: none;
    border-top: 1px solid var(--border2);
    margin: 16px 0;
}

.ev-modal-desc-long {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.75;
}

.ev-modal-body-text {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.65;
    margin: 0 0 18px;
}

.ev-modal-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid var(--border2);
}

/* Footer modal detail — tombol Panitia & Donasi rata kiri+kanan */
.ev-modal-foot-detail {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid var(--border2);
}

.ev-modal-foot-detail .ev-modal-foot-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   DONASI FORM (modal step 1 & 2)
   ══════════════════════════════════════════════ */
.ev-donasi-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ev-donasi-nominal {
    background: var(--gold-dim);
    border: 1px solid rgba(201, 168, 76, .25);
    border-radius: 8px;
    padding: 14px 20px;
    text-align: center;
}

.ev-donasi-nominal-label {
    font-size: .66rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 5px;
}

.ev-donasi-nominal-value {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
}

.ev-donasi-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ev-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ev-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.ev-input {
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .88rem;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
    transition: border-color .2s, box-shadow .2s;
}

.ev-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .08);
}

.ev-input[readonly] {
    opacity: .6;
    cursor: default;
}

/* Input Rupiah */
.ev-input-rupiah-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    background: rgba(255, 255, 255, .04);
}

.ev-input-rupiah-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .08);
}

.ev-input-rupiah-prefix {
    padding: 10px 12px;
    background: var(--gold-dim);
    color: var(--gold);
    font-size: .82rem;
    font-weight: 700;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    font-family: 'Cinzel', serif;
}

.ev-input-rupiah {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 0;
}

.ev-input-rupiah:focus {
    outline: none;
}

.ev-input-terbilang {
    font-size: .72rem;
    color: var(--gold);
    font-style: italic;
    min-height: 18px;
    display: block;
    margin-top: 3px;
}

/* Donasi QR */
.ev-donasi-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gold-dim);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
}

.ev-donasi-qr-label {
    font-size: .74rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ev-donasi-qr-img {
    max-width: 180px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.ev-donasi-qr-hint {
    font-size: .76rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.55;
}

.ev-donasi-qr-hint strong {
    color: var(--gold);
}

.ev-donasi-no-qr {
    text-align: center;
    color: var(--muted);
    font-size: .86rem;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.ev-donasi-no-qr-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Summary donasi step 2 */
.ev-donasi-summary {
    background: var(--gold-dim);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.ev-donasi-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: .84rem;
}

.ev-donasi-summary-label {
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
    min-width: 60px;
}

.ev-donasi-summary-val {
    color: var(--text);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.ev-donasi-summary-nominal {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
}

/* Alert */
.ev-alert {
    border-radius: 6px;
    padding: 10px 14px;
    font-size: .82rem;
    font-weight: 500;
    margin-top: 6px;
    line-height: 1.5;
}

.ev-alert-success {
    background: rgba(76, 175, 130, .12);
    border: 1px solid rgba(76, 175, 130, .3);
    color: var(--success);
}

.ev-alert-error {
    background: rgba(224, 90, 90, .1);
    border: 1px solid rgba(224, 90, 90, .25);
    color: var(--danger);
}

/* ══════════════════════════════════════════════
   LIGHT MODE OVERRIDES
   ══════════════════════════════════════════════ */
[data-theme="light"] .ev-card {
    background: var(--panel, #fff);
}

[data-theme="light"] .ev-card-date {
    background: linear-gradient(135deg, #f5f3ee, rgba(160, 120, 40, .08));
}

[data-theme="light"] .ev-modal {
    background: var(--panel, #fff);
}

[data-theme="light"] .ev-input {
    background: rgba(0, 0, 0, .03);
}

[data-theme="light"] .ev-input-rupiah-wrap {
    background: rgba(0, 0, 0, .03);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .ev-hero {
        padding: 90px 20px 56px;
    }

    .ev-grid {
        grid-template-columns: 1fr;
    }

    .ev-modal {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .ev-modal-title {
        font-size: 1rem;
    }

    .ev-section {
        padding: 40px 16px 72px;
    }

    .ev-modal-foot-detail {
        flex-direction: column;
        align-items: stretch;
    }

    .ev-modal-foot-detail .ev-modal-foot-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .ev-card-actions {
        gap: 6px;
    }

    .ev-btn {
        font-size: .74rem;
        padding: 6px 11px;
    }

    .ev-donasi-nominal-value {
        font-size: 1.15rem;
    }

    .ev-modal-foot-detail .ev-modal-foot-actions {
        flex-direction: column;
    }

    .ev-modal-foot-detail .ev-modal-foot-actions .ev-btn {
        justify-content: center;
    }
}