@import url("../events-modal/event-content.css");

:root {
    --box-shadow: 0 4px 12px rgba(145, 174, 126, 0.3);
}
/* Events-only modal built on event-content visuals */
.event-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4vh 3vw;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10020;
}

.event-modal.active { display: flex; }

.event-modal-content {
    background: #dee5db;
    border-radius: var(--border-radius, 0.6vw);
    width: 100%;
    max-width: 1180px;
    height: 80vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(120, 150, 102, 0.18), 0 2px 8px rgba(0,0,0,0.08);
    border: 1.5px solid #b7cdb0;
    overflow: hidden;
    position: relative;
    padding: 0;
}

.event-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(174, 187, 170, 0.9);
    border: none;
    border-radius: var(--border-radius, 0.6vw);
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.event-modal-close:hover {
    background: rgba(145, 174, 126, 0.95);
    transform: scale(1.04);
}

.event-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 24px 1.25rem 16px;
    background-color: #8caa76;
    border-bottom: 1px solid #0000001a;
    border-radius: calc(var(--border-radius, 0.6vw) - 0.1rem) calc(var(--border-radius, 0.6vw) - 0.1rem) 0 0;
}

.event-modal-title {
    font-size: 1.5rem;
    font-weight: 850;
    color: #4a5568;
    letter-spacing: 0.01em;
    flex: 1;
    text-align: center;
    margin: 0;
}

.event-modal-date {
    padding: 0.6rem 1rem;
    background: #f3f5f1;
    border-radius: 0.6vw;
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.event-modal-body {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow: hidden;
    min-height: 0;
    align-items: stretch;
    flex: 1 1 auto;
    padding: 0 1.5rem;
}

.event-modal-media {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
    position: relative;
}
.event-modal-thumbs {
    display: none !important;
}
.event-modal-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    padding: 0.5rem 0 0;
}
.event-modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}
.event-modal-dot.active {
    background: #91AE7E;
    transform: scale(1.15);
}
.event-modal-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    padding: 0.5rem 0 0;
}
.event-modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}
.event-modal-dot.active {
    background: #91AE7E;
    transform: scale(1.15);
}
.event-modal-thumb {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--border-radius, 0.6vw);
    cursor: pointer;
    transition: filter 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.event-modal-thumb:not(.selected) { filter: brightness(0.55) saturate(0.95); opacity: 0.85; }
.event-modal-thumb.selected { filter: none; opacity: 1; }

.event-modal-media .event-poster-img-wrapper,
.event-modal .img-wrapper { width: 100%; display: flex; position: relative; overflow: visible; }
.event-modal-media .event-poster-img { width: 100%; height: auto; max-height: 54vh; object-fit: contain; }
.event-modal-media .event-poster-img-wrapper {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
}
.event-modal-link-media {
    align-self: center;
    width: auto;
    min-width: max-content;
    text-align: center;
}
.event-modal-link-media { align-self: center; }
.event-modal-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 3;
}
.event-modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}
.event-modal-dot.active {
    background: #91AE7E;
    transform: scale(1.15);
}

.event-modal-info {
    flex: 1 1 50%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.event-info-description {
    max-height: 46vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.event-info-description .event-info-content { overflow-y: inherit; }

.event-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    background: rgba(140, 170, 118, 0.15);
    color: #4a5568;
    font-weight: 700;
    margin-top: auto;
    flex-shrink: 0;
}

.event-modal-footer .event-modal-date {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
}

.event-modal-close-btn,
.gallery-modal-main-close {
    background: #aebbaa;
    border: none;
    border-radius: var(--border-radius, 0.6vw);
    color: #4a5568;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1;
}
.event-modal-close-btn:hover,
.gallery-modal-main-close:hover {
    background: #8caa76;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.event-modal-link {
    background: #8caa76;
    color: #4a5568 !important;
    border: none;
    border-radius: var(--border-radius, 0.6vw);
    padding: 0.7rem 1.2rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: var(--box-shadow);
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.event-modal-link:hover { background: #9ebe86; box-shadow: 0 0 1vh rgba(0,0,0,0.15); }

@media (max-width: 900px) {
    :root { --border-radius: 1vw; }
    .event-modal { padding: 2vh 1.5vw; }
    .event-modal-content { height: auto; max-height: 92vh; }
    .event-modal-body { flex-direction: column; }
    .event-modal-media {
        flex: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .event-modal-media .event-poster-img { max-height: 60vh; }

    .event-info-description {
        max-height: 35vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .event-info-description .event-info-content {
        overflow-y: inherit;
    }

    .event-info-box {
        max-height: 20vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .event-modal-info .event-modal-link-media {
        align-self: center;
        justify-content: center;
        text-align: center;
        width: auto;
        max-width: 80%;
        margin-top: 0.5rem;
    }

    .event-modal-thumbs { display: none; }

    .event-modal-dots {
        display: inline-flex;
        bottom: 6px;
    }
}

#event-modal-fullscreen {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10040;
}
#event-modal-fullscreen.active { display: flex; }
#event-modal-fullscreen .event-fullscreen-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#event-modal-fullscreen .event-fullscreen-img {
    position: relative;
    width: 95vw;
    height: 95vh;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    border-radius: var(--border-radius, 0.6vw);
    z-index: 1;
    cursor: zoom-out;
}
