/* ==========================================================================
   EventX — Event List (tabbed) widget
   ========================================================================== */

.eventx-list {
    width: 100%;
}

/* Neutralize ALL theme button styling so nothing bleeds into the tabs. */
.eventx-list button,
.eventx-list button:hover,
.eventx-list button:focus,
.eventx-list button:active {
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    background-color: transparent;
    box-shadow: none;
    text-shadow: none;
    outline: none;
    border: none;
}

/* ---------- Tabs ---------- */
.eventx-list__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 24px;
}

.eventx-list__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    background: transparent;
    transition: color .2s ease;
    white-space: nowrap;
}

.eventx-list__tab:hover {
    color: #e4002b;
    background: transparent;
}

.eventx-list__tab.is-active {
    color: #e4002b;
    background: transparent;
}

/* Red underline on active tab */
.eventx-list__tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
    transition: background .2s ease;
}

.eventx-list__tab.is-active::after {
    background: #e4002b;
}

.eventx-list__tab-icon {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    line-height: 1;
}

.eventx-list__tab-icon svg {
    width: 1em;
    height: 1em;
}

/* ---------- Panels ---------- */
.eventx-list__panel {
    display: none;
}

.eventx-list__panel.is-active {
    display: block;
}

/* ---------- Rows ---------- */
.eventx-list__row {
    display: flex;
    align-items: stretch;
    gap: 22px;
    background: #fff;
    padding: 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
    transition: box-shadow .2s ease;
}

.eventx-list__row:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.eventx-list__thumb {
    flex: 0 0 160px;
    width: 160px;
    overflow: hidden;
    border-radius: 6px;
    display: block;
    min-height: 110px;
}

.eventx-list__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eventx-list__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eventx-list__title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
}

.eventx-list__title a {
    color: #1a1a1a;
    text-decoration: none;
}

.eventx-list__title a:hover {
    color: #e4002b;
}

.eventx-list__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #777;
    margin-top: 10px;
    line-height: 1.4;
}

.eventx-list__meta i {
    font-size: 15px;
    color: #bbb;
    flex-shrink: 0;
}

.eventx-list__empty {
    padding: 28px;
    text-align: center;
    color: #999;
    background: #fafafa;
    border-radius: 8px;
}

/* Rows are clickable in popup mode */
.eventx-list--popup-mode .eventx-list__row {
    cursor: pointer;
}

/* Hidden popup data stores (never visible) */
.eventx-popup-data {
    display: none;
}

/* ---------- Popup Modal ---------- */
@keyframes eventx-popup-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes eventx-popup-overlay-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes eventx-popup-dialog-in {
    from { opacity: 0; transform: scale(0.93) translateY(18px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}
@keyframes eventx-popup-dialog-out {
    from { opacity: 1; transform: scale(1)    translateY(0);    }
    to   { opacity: 0; transform: scale(0.93) translateY(18px); }
}

.eventx-popup-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.eventx-popup-modal.is-open {
    display: flex;
}

.eventx-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    animation: eventx-popup-overlay-in 0.25s ease forwards;
}

.eventx-popup-dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 1000px;
    width: calc(100% - 32px);
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .28);
    z-index: 1;
    animation: eventx-popup-dialog-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Close button */
.eventx-popup-close {
    position: absolute !important;
    top: 26px !important;
    right: 26px !important;
    z-index: 10;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, .45) !important;
    color: #fff !important;
    font-size: 22px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    border: none !important;
    box-shadow: none !important;
    transition: background .15s ease;
}

.eventx-popup-close:hover {
    background: rgba(0, 0, 0, .7) !important;
}

/* Featured image — inset with margin, all corners rounded (matches reference) */
.eventx-popup__image-wrap {
    height: 432px;
    margin: 16px 16px 0;
    overflow: hidden;
    border-radius: 12px;
    flex-shrink: 0;
}

.eventx-popup__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.eventx-popup__body {
    padding: 18px 24px 28px;
}

/* Meta bar: date + location | gcal button */
.eventx-popup__meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.eventx-popup__meta-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eventx-popup__meta-date,
.eventx-popup__meta-loc {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.eventx-popup__meta-date i,
.eventx-popup__meta-loc i {
    font-size: 15px;
    color: #999;
    flex-shrink: 0;
}

/* Google Calendar button */
/* Wrapper: standalone icon + separate red pill button */
.eventx-popup__gcal-btn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    background: transparent !important;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Standalone Google Calendar logo — no background box */
.eventx-popup__gcal-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.eventx-popup__gcal-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Red pill button (text only) */
.eventx-popup__gcal-label {
    background: rgba(181, 31, 53, 0.6);
    color: #fff;
    padding: 11px 22px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .8px;
    transition: background .15s ease;
}

.eventx-popup__gcal-btn:hover .eventx-popup__gcal-label {
    background: rgba(181, 31, 53, 0.75);
}

/* Title */
.eventx-popup__title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 16px;
}

/* Content */
.eventx-popup__content {
    font-size: 13px;
    line-height: 1.7;
    color: #666;
}

.eventx-popup__content p {
    margin: 0 0 13px;
}

.eventx-popup__content p:last-child {
    margin-bottom: 0;
}


/* Prevent body scroll when modal open — position:fixed preserves scroll position */
body.eventx-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .eventx-list__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .eventx-list__thumb {
        width: 100%;
        flex-basis: auto;
        min-height: 180px;
    }

    .eventx-list__tab {
        padding: 12px 16px;
        font-size: 14px;
    }
}
