/* ============================================================
   ESAForum — Events & Tournaments CSS
   Created by ESAGAMES HOSTING SHIELD SRL
   ============================================================ */

/* ------------------------------------------------------------------ */
/* Section titles                                                      */
/* ------------------------------------------------------------------ */
.ev-section { margin-bottom: 40px; }

.ev-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.ev-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.ev-dot-live {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: ev-pulse 1.6s ease-in-out infinite;
}

@keyframes ev-pulse {
    0%, 100% { box-shadow: 0 0 4px var(--green); }
    50%       { box-shadow: 0 0 14px var(--green), 0 0 28px var(--green); }
}

/* ------------------------------------------------------------------ */
/* Event grid                                                          */
/* ------------------------------------------------------------------ */
.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ev-grid-past {
    opacity: .82;
}

/* ------------------------------------------------------------------ */
/* Event card                                                          */
/* ------------------------------------------------------------------ */
.ev-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ev-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0,0,0,.35);
    border-color: var(--primary);
}

.ev-card-live {
    border-color: var(--green);
    box-shadow: 0 0 0 1px var(--green), 0 4px 20px rgba(16,185,129,.15);
}

.ev-card-live:hover {
    box-shadow: 0 0 0 1px var(--green), 0 10px 32px rgba(16,185,129,.25);
}

.ev-card-past .ev-cover {
    filter: grayscale(35%);
}

/* ------------------------------------------------------------------ */
/* Card cover image / gradient                                         */
/* ------------------------------------------------------------------ */
.ev-cover {
    position: relative;
    display: block;
    height: 160px;
    text-decoration: none;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.ev-cover-past { height: 120px; }

.ev-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.08) 0%, rgba(0,0,0,.55) 100%);
}

/* ------------------------------------------------------------------ */
/* Game tag                                                            */
/* ------------------------------------------------------------------ */
.ev-game-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(var(--primary-rgb),.85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* ------------------------------------------------------------------ */
/* Countdown badge                                                     */
/* ------------------------------------------------------------------ */
.ev-countdown {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(20,20,35,.75);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    backdrop-filter: blur(6px);
    z-index: 2;
}

.ev-countdown-live {
    background: rgba(16,185,129,.2);
    border-color: var(--green);
    color: var(--green);
    animation: ev-pulse-badge 1.8s ease-in-out infinite;
}

@keyframes ev-pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
    50%       { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

.ev-countdown-ended {
    background: rgba(100,100,120,.3);
    border-color: rgba(255,255,255,.08);
    color: var(--text-mute);
}

/* ------------------------------------------------------------------ */
/* Card body                                                           */
/* ------------------------------------------------------------------ */
.ev-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ev-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.35;
}

.ev-title a {
    color: var(--text);
    text-decoration: none;
    transition: color .15s;
}

.ev-title a:hover { color: var(--primary); }

.ev-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 10px;
}

.ev-meta-item {
    font-size: 12.5px;
    color: var(--text-mute);
}

.ev-desc {
    font-size: 13.5px;
    color: var(--text-mute);
    line-height: 1.6;
    margin: 0 0 12px;
    flex: 1;
}

.ev-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.ev-creator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-mute);
}

.ev-going-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.25);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ------------------------------------------------------------------ */
/* Hero (show page)                                                    */
/* ------------------------------------------------------------------ */
.ev-hero {
    position: relative;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    margin-bottom: 0;
    display: flex;
    align-items: flex-end;
}

.ev-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,.75) 100%);
}

.ev-hero-content {
    position: relative;
    z-index: 2;
    padding: 28px 32px;
    width: 100%;
}

.ev-hero-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 10px 0 8px;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.ev-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 13.5px;
    color: rgba(255,255,255,.75);
    font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* Event detail: details list                                          */
/* ------------------------------------------------------------------ */
.ev-details-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    font-size: 13.5px;
}

.ev-details-list dt {
    color: var(--text-mute);
    font-weight: 600;
    white-space: nowrap;
}

.ev-details-list dd {
    margin: 0;
    color: var(--text);
}

/* ------------------------------------------------------------------ */
/* RSVP widget                                                         */
/* ------------------------------------------------------------------ */
.ev-rsvp-counts {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.ev-rsvp-count {
    flex: 1;
    text-align: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 8px;
}

.ev-rsvp-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.ev-rsvp-label {
    font-size: 11px;
    color: var(--text-mute);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ev-rsvp-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ev-rsvp-btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all .15s ease;
}

.ev-rsvp-active-going {
    background: rgba(16,185,129,.15) !important;
    border: 1px solid var(--green) !important;
    color: var(--green) !important;
    font-weight: 700;
}

.ev-rsvp-active-maybe {
    background: rgba(251,191,36,.12) !important;
    border: 1px solid var(--amber) !important;
    color: var(--amber) !important;
    font-weight: 700;
}

.ev-rsvp-active-no {
    background: rgba(248,113,113,.12) !important;
    border: 1px solid #f87171 !important;
    color: #f87171 !important;
    font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Going users list (show page)                                        */
/* ------------------------------------------------------------------ */
.ev-going-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-going-list a img {
    transition: transform .15s ease, box-shadow .15s ease;
}

.ev-going-list a img:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 2px var(--primary);
}

/* ------------------------------------------------------------------ */
/* Description (show page)                                             */
/* ------------------------------------------------------------------ */
.ev-description {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14.5px;
}

/* ------------------------------------------------------------------ */
/* Form helpers (used in event/form.php)                               */
/* ------------------------------------------------------------------ */
.ev-form-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ev-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 640px) {
    .ev-grid { grid-template-columns: 1fr; }
    .ev-hero  { height: 220px; }
    .ev-hero-title { font-size: 20px; }
    .ev-hero-content { padding: 18px 20px; }
}

@media (max-width: 768px) {
    .ev-hero { height: 240px; }
    .ev-rsvp-btns { flex-wrap: wrap; }
    .ev-rsvp-btn { min-width: 0; }
    .ev-hero-meta { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
    .ev-grid { grid-template-columns: 1fr; }
    .ev-hero { height: 180px; border-radius: 10px; }
    .ev-hero-title { font-size: 18px; }
    .ev-hero-content { padding: 14px 16px; }
    .ev-hero-meta { font-size: 12px; gap: 3px; }
    .ev-card { border-radius: 10px; }
    .ev-cover { height: 140px; }
    .ev-cover-past { height: 100px; }
    .ev-body { padding: 12px 14px 14px; }
    .ev-title { font-size: 14px; }
    .ev-rsvp-counts { gap: 6px; }
    .ev-rsvp-num { font-size: 18px; }
    .ev-rsvp-btns { gap: 6px; }
    .ev-rsvp-btn { flex: 1 1 100%; }
    .ev-form-date-row { grid-template-columns: 1fr; }
    .ev-form-actions { flex-direction: column; }
    .ev-form-actions .btn { width: 100%; text-align: center; justify-content: center; }
    .ev-footer { flex-wrap: wrap; gap: 8px; }
}
