/* ================================================================
   Halaba Zone Prosperity Party — Events Module
   Dedicated stylesheet (kept separate from public.css on purpose:
   small + self-contained, so it uploads reliably even on flaky FTP).
   ================================================================ */

.ev-list { width: 100%; }

/* ---------- Event card (list) ---------- */
.ev-card {
    display: block;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(6, 48, 92, 0.09), 0 1px 3px rgba(6, 48, 92, 0.06);
    margin-bottom: 16px;
    text-decoration: none !important;
    color: inherit !important;
    border: 1px solid rgba(6, 48, 92, 0.05);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease,
                box-shadow 0.2s ease, border-color 0.2s ease;
}

.ev-card.revealed { opacity: 1; transform: translateY(0); }
.ev-card * { text-decoration: none !important; }

@media (hover: hover) {
    .ev-card:hover {
        box-shadow: 0 10px 28px rgba(6, 48, 92, 0.16), 0 2px 6px rgba(6, 48, 92, 0.08);
        border-color: rgba(11, 83, 158, 0.18);
        transform: translateY(-3px);
    }
    .ev-card:hover .ev-cover img { transform: scale(1.06); }
}

.ev-card:active { transform: scale(0.985); }

/* ---------- Cover / hero area ---------- */
.ev-cover {
    position: relative;
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, var(--hp-dark) 0%, var(--hp-primary) 60%, #1667b8 100%);
    overflow: hidden;
}

.ev-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ev-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ev-cover-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(245, 218, 7, 0.16) 2px, transparent 2px);
    background-size: 18px 18px;
    opacity: 0.5;
}

.ev-cover-placeholder i {
    font-size: 2.4rem;
    color: rgba(255, 255, 255, 0.55);
}

.ev-cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6,48,92,0) 45%, rgba(6,48,92,0.55) 100%);
    pointer-events: none;
}

/* Status badge (top-left over cover) */
.ev-status {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ev-status-live {
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
}

.ev-status-live .ev-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: ev-pulse 1.4s infinite;
}

.ev-status-today { background: rgba(245, 218, 7, 0.95); color: var(--hp-dark); }
.ev-status-upcoming { background: rgba(255, 255, 255, 0.92); color: var(--hp-primary); }
.ev-status-ended { background: rgba(255, 255, 255, 0.85); color: #6b7480; }

@keyframes ev-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    70% { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Date badge (top-right over cover) */
.ev-date-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    padding: 5px 0 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.ev-date-badge .ev-day {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--hp-dark);
    line-height: 1.1;
}

.ev-date-badge .ev-mon {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--hp-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Title overlay on cover for a punchier hero look */
.ev-cover-title {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Body ---------- */
.ev-body { padding: 14px 15px 15px; }

.ev-title {
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.4;
    color: #16233a;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ev-meta-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.ev-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: #66707d;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ev-meta .ev-meta-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(11, 83, 158, 0.08);
    color: var(--hp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.ev-desc {
    font-size: 0.8rem;
    color: #8992a0;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Footer: attendees + join ---------- */
.ev-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed #eaecf0;
}

.ev-attendees {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
}

.ev-avatar-stack { display: flex; flex-shrink: 0; }

.ev-avatar-stack .ev-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hp-primary), var(--hp-dark));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    margin-left: -8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ev-avatar-stack .ev-avatar:first-child { margin-left: 0; }

.ev-attendee-count {
    font-size: 0.74rem;
    font-weight: 700;
    color: #556070;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-mini-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 4px;
    flex-shrink: 0;
}

.ev-mini-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: #99a2ad;
    font-weight: 600;
}

button.ev-mini-stat {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
button.ev-mini-stat.reposted { color: #17a34a; }

/* ---------- Join button ---------- */
.ev-join-btn {
    margin-left: auto;
    flex-shrink: 0;
    border: none;
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-dark) 100%);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(11, 83, 158, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.ev-join-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    box-shadow: 0 0 0 0 rgba(245, 218, 7, 0.6);
}

.ev-join-btn:active { transform: scale(0.94); }

.ev-join-btn.going {
    background: linear-gradient(135deg, #1e8a4c 0%, #146336 100%);
    box-shadow: 0 4px 12px rgba(30, 138, 76, 0.35);
}

.ev-join-btn i { font-size: 0.85rem; }

/* ---------- Past / ended events ---------- */
.ev-card.ev-card-past {
    box-shadow: 0 2px 6px rgba(6,48,92,0.05);
    opacity: 0.92;
}
.ev-card.ev-card-past .ev-cover {
    height: 96px;
    background: linear-gradient(135deg, #8a94a0, #6b7480);
}
.ev-card.ev-card-past .ev-title { color: #6b7480; }

/* ---------- Empty state ---------- */
.ev-empty {
    background: #fff;
    border-radius: 16px;
    padding: 36px 20px;
    text-align: center;
    color: #99a2ad;
    box-shadow: 0 2px 10px rgba(6,48,92,0.06);
}
.ev-empty i { font-size: 2.4rem; color: #c7ccd3; margin-bottom: 10px; display: block; }

/* ================================================================
   Detail page
   ================================================================ */
.ev-detail-hero {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 18px;
    overflow: hidden;
    margin-top: 8px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--hp-dark), var(--hp-primary));
}

.ev-detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ev-detail-title {
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.4;
    color: #16233a;
    margin-bottom: 8px;
}

.ev-detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #66707d;
    margin-bottom: 6px;
}

.ev-detail-meta .ev-meta-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(11,83,158,0.08);
    color: var(--hp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.ev-countdown {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(120deg, var(--hp-primary), var(--hp-dark));
    color: #fff;
    border-radius: 16px;
    padding: 16px;
    margin: 14px 0;
    box-shadow: 0 6px 18px rgba(11,83,158,0.28);
    position: relative;
    overflow: hidden;
}

.ev-countdown::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -10%;
    width: 140px;
    height: 140px;
    background: rgba(245, 218, 7, 0.12);
    border-radius: 50%;
}

.ev-countdown-date {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(255,255,255,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ev-countdown-date .ev-day { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.ev-countdown-date .ev-mon { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.4px; opacity: 0.9; }

.ev-countdown-body { z-index: 1; }
.ev-countdown-label { font-size: 0.72rem; opacity: 0.85; margin-bottom: 2px; }
.ev-countdown-value { font-size: 1.05rem; font-weight: 800; }

.ev-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.ev-btn-join {
    flex-grow: 1;
    min-width: 140px;
    border: none;
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-dark) 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 14px 18px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(11, 83, 158, 0.35);
    text-decoration: none !important;
    transition: transform 0.15s ease;
}
.ev-btn-join:active { transform: scale(0.97); }
.ev-btn-join.going { background: linear-gradient(135deg, #1e8a4c 0%, #146336 100%); box-shadow: 0 6px 16px rgba(30,138,76,0.35); }

.ev-btn-ics {
    border: 1.5px solid #e1e5ea;
    background: #fff;
    color: #445064;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 13px 16px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none !important;
}

.ev-social-proof {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f6f8fb;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    font-size: 0.82rem;
    color: #556070;
}

.ev-social-proof strong { color: #16233a; }

/* ---------- Dark mode ---------- */
body.dark-mode .ev-card { background: #16201a; border-color: #223227; }
body.dark-mode .ev-title,
body.dark-mode .ev-detail-title { color: #f2f4f2; }
body.dark-mode .ev-meta,
body.dark-mode .ev-desc,
body.dark-mode .ev-mini-stat,
body.dark-mode .ev-attendee-count,
body.dark-mode .ev-detail-meta { color: #8fa093; }
body.dark-mode .ev-footer { border-top-color: #223227; }
body.dark-mode .ev-status-upcoming { background: rgba(22,32,26,0.85); color: var(--hp-secondary); }
body.dark-mode .ev-btn-ics { background: #16201a; border-color: #223227; color: #cfd6d1; }
body.dark-mode .ev-social-proof { background: #16201a; color: #cfd6d1; }
body.dark-mode .ev-social-proof strong { color: #f2f4f2; }
body.dark-mode .ev-empty { background: #16201a; color: #8fa093; }

/* ---------- Small screens fine-tuning ---------- */
@media (max-width: 360px) {
    .ev-cover { height: 120px; }
    .ev-title { font-size: 0.92rem; }
    .ev-join-btn { padding: 7px 13px; font-size: 0.72rem; }
}
