/* =========================================================
   Event Popup — full-screen announcement for upcoming events
   Fluid sizing: scales continuously with viewport (clamp/min)
   ========================================================= */

#event-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(8, 8, 30, 0.82);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 4vw, 20px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

#event-popup-overlay.show {
    display: flex;
}

#event-popup-overlay.visible {
    opacity: 1;
}

body.event-popup-open {
    overflow: hidden;
}

.event-popup-card {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 880px;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border-radius: clamp(12px, 2.5vw, 18px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

#event-popup-overlay.visible .event-popup-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.event-popup-close {
    position: absolute;
    top: clamp(10px, 2.5vw, 14px);
    right: clamp(10px, 2.5vw, 14px);
    z-index: 2;
    width: clamp(34px, 8vw, 40px);
    height: clamp(34px, 8vw, 40px);
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: clamp(1rem, 3vw, 1.25rem);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.event-popup-close:hover {
    background: var(--bs-primary, #1111ab);
    transform: rotate(90deg);
}

.event-popup-media {
    position: relative;
    line-height: 0;
    background: #000;
    border-radius: clamp(12px, 2.5vw, 18px) clamp(12px, 2.5vw, 18px) 0 0;
    overflow: hidden;
}

.event-popup-media img {
    width: 100%;
    height: auto;
    max-height: min(75vh, 640px);
    object-fit: contain;
    background: #000;
    display: block;
    margin: 0 auto;
}

.event-popup-badge {
    position: absolute;
    top: clamp(10px, 2.5vw, 16px);
    left: clamp(10px, 2.5vw, 16px);
    background: #FFD300;
    color: #1111ab;
    font-weight: 700;
    font-size: clamp(0.68rem, 2vw, 0.78rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: clamp(5px, 1.2vw, 7px) clamp(10px, 2.5vw, 14px);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.event-popup-body {
    padding: clamp(18px, 4.5vw, 28px) clamp(18px, 5vw, 32px) clamp(22px, 5vw, 32px);
}

.event-popup-eyebrow {
    color: var(--bs-primary, #1111ab);
    font-weight: 700;
    font-size: clamp(0.72rem, 1.8vw, 0.82rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.event-popup-title {
    font-size: clamp(1.15rem, 4.2vw, 1.65rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.25;
}

.event-popup-subtitle {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    font-style: italic;
    color: #444;
    margin-bottom: clamp(14px, 3vw, 18px);
    line-height: 1.5;
}

.event-popup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(10px, 2.5vw, 14px) clamp(16px, 4vw, 28px);
    margin-bottom: clamp(14px, 3vw, 18px);
}

.event-popup-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 min(220px, 100%);
    min-width: 0;
}

.event-popup-meta-item i {
    color: var(--bs-primary, #1111ab);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    margin-top: 2px;
    flex-shrink: 0;
}

.event-popup-meta-item strong {
    display: block;
    font-size: clamp(0.88rem, 2.2vw, 0.95rem);
    color: #1a1a1a;
}

.event-popup-meta-item span {
    font-size: clamp(0.82rem, 2vw, 0.88rem);
    color: #666;
}

.event-popup-patronage {
    font-size: clamp(0.76rem, 1.8vw, 0.82rem);
    color: #777;
    border-top: 1px solid #eee;
    padding-top: clamp(10px, 2.5vw, 14px);
    margin-bottom: clamp(16px, 3.5vw, 22px);
}

.event-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 12px);
}

.event-popup-actions .btn {
    flex: 1 1 auto;
    padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 22px);
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    white-space: nowrap;
}

@media (max-width: 420px) {
    .event-popup-actions .btn {
        flex: 1 1 100%;
        text-align: center;
    }
}
