/**
 * MM Reps - Events Filter Styles
 */

.mm-events {
    --mm-pill-active: #4F46E5;
    --mm-pill-active-text: #FFFFFF;
    --mm-pill-bg: #FFFFFF;
    --mm-pill-text: #374151;
    --mm-pill-border: #E5E7EB;
    --mm-label: #4F46E5;
    --mm-bar-bg: #F8FAFC;
    --mm-bar-border: #E5E7EB;
    --mm-card-border: #E5E7EB;
    --mm-card-text: #1F2937;
    --mm-muted: #6B7280;

    width: 100%;
}

/* Filter bar
   ============================ */

.mm-events-filter {
    background: var(--mm-bar-bg);
    border: 1px solid var(--mm-bar-border);
    border-radius: 12px;
    padding: 22px 26px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mm-events-filter__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
}

.mm-events-filter__heading {
    font-size: 14px;
    font-weight: 700;
    color: #1F2937;
    letter-spacing: 0.01em;
}

.mm-events-filter__clear {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    color: #4F46E5;
    border: 1px solid #C7D2FE;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.mm-events-filter__clear:hover {
    background: #EEF2FF;
    border-color: #A5B4FC;
}

.mm-events-filter__clear:focus-visible {
    outline: 2px solid var(--mm-pill-active);
    outline-offset: 2px;
}

.mm-events-filter__clear[hidden] {
    display: none;
}

.mm-events-filter__clear svg {
    flex-shrink: 0;
}

.mm-events-filter__row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mm-events-filter__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mm-label);
    line-height: 1;
}

.mm-events-filter__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mm-pill {
    appearance: none;
    -webkit-appearance: none;
    background: var(--mm-pill-bg);
    color: var(--mm-pill-text);
    border: 1px solid var(--mm-pill-border);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
    font-family: inherit;
}

.mm-pill:hover {
    border-color: #C7C9D1;
}

.mm-pill:focus-visible {
    outline: 2px solid var(--mm-pill-active);
    outline-offset: 2px;
}

.mm-pill.is-active {
    background: var(--mm-pill-active);
    color: var(--mm-pill-active-text);
    border-color: var(--mm-pill-active);
}

/* Show a small "x" affordance on active state/test-kitchen pills so users know
   they can click again to deselect. Region pills always have "All Regions" so
   skip the affordance there. */
.mm-events-filter__pills[data-filter="state"] .mm-pill.is-active::after,
.mm-events-filter__pills[data-filter="test_kitchen"] .mm-pill.is-active::after {
    content: "\00d7";
    display: inline-block;
    margin-left: 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.85;
    transform: translateY(-0.5px);
}

/* Results
   ============================ */

.mm-events-results {
    position: relative;
    transition: opacity 200ms ease;
}

.mm-events-results.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.mm-events-empty {
    padding: 32px;
    text-align: center;
    color: var(--mm-muted);
    background: #FAFAFA;
    border: 1px dashed var(--mm-card-border);
    border-radius: 10px;
}

.mm-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Cards
   ============================ */

.mm-event-card {
    background: #FFFFFF;
    border: 1px solid var(--mm-card-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.mm-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.mm-event-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #F1F5F9;
    overflow: hidden;
}

.mm-event-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mm-event-card__media-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
}

.mm-event-card__status {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 0px 10px;
    border-radius: 999px;
    background: #FFFFFF;
    color: #1F2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mm-event-card__status.is-open {
    background: #dcfce7;
    color: #008236;
}

.mm-event-card__status.is-almost-full {
    background: #FFFBEB;
    color: #92400E;
}

.mm-event-card__status.is-coming-soon {
    background: #EFF6FF;
    color: #1E40AF;
}

.mm-event-card__status.is-sold-out {
    background: #FEF2F2;
    color: #991B1B;
}

.mm-event-card__status.is-past {
    background: #F3F4F6;
    color: #4B5563;
}

.mm-event-card__status.is-cancelled {
    background: #FEE2E2;
    color: #7F1D1D;
    text-decoration: line-through;
}

.mm-event-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.mm-event-card__date {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mm-pill-active);
    margin: 0;
	padding-bottom:0;
}

.mm-event-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--mm-card-text);
    margin: 0;
	padding-bottom:0;
}

.mm-event-card__title a {
    color: inherit;
    text-decoration: none;
}

.mm-event-card__title a:hover {
    color: var(--mm-pill-active);
}

.mm-event-card__location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--mm-muted);
    margin: 0;
	padding-bottom:0;
}

.mm-event-card__pin {
    flex-shrink: 0;
    color: var(--mm-muted);
}

.mm-event-card__excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: var(--mm-muted);
    margin: 4px 0 0;
}

.mm-event-card__cta {
    margin-top: auto;
    padding-top: 12px;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: var(--mm-pill-active);
    text-decoration: none;
}

.mm-event-card__cta:hover {
    text-decoration: underline;
}

/* Past events gallery thumbnails (clickable -> lightbox)
   ============================
   The anchor must fill its grid cell so the image fills the aspect-ratio
   container instead of collapsing to its intrinsic height. */

.past-event-row__gallery-item {
    overflow: hidden;
    border-radius: 6px;
}

.past-event-row__gallery-item .mm-event-lightbox {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 6px;
    line-height: 0;
}

.past-event-row__gallery-item .mm-event-lightbox img {
    transition: transform 250ms ease, opacity 200ms ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.past-event-row__gallery-item .mm-event-lightbox:hover img {
    transform: scale(1.04);
    opacity: 0.95;
}

/* Lightbox overlay
   ============================
   When closed, the element is fully removed from interaction with both
   visibility:hidden and pointer-events:none. We don't use display:none
   so that the opacity transition can play before it disappears. */

.mm-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 0s linear 180ms;
    padding: 24px;
    box-sizing: border-box;
}

.mm-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 180ms ease, visibility 0s linear 0s;
}

.mm-lightbox__stage {
    position: relative;
    max-width: min(1200px, 100%);
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
    background: #000;
}

.mm-lightbox__btn {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 150ms ease, transform 150ms ease, border-color 150ms ease;
    padding: 0;
}

.mm-lightbox__btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
}

.mm-lightbox__btn:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.mm-lightbox__btn:active {
    transform: scale(0.94);
}

.mm-lightbox__btn svg {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.mm-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
}

.mm-lightbox__prev,
.mm-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
}

.mm-lightbox__prev {
    left: 20px;
}

.mm-lightbox__next {
    right: 20px;
}

.mm-lightbox__prev:active,
.mm-lightbox__next:active {
    transform: translateY(-50%) scale(0.94);
}

.mm-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mm-lightbox__btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

body.mm-lightbox-open {
    overflow: hidden;
}

/* Responsive
   ============================ */

@media (max-width: 640px) {
    .mm-events-filter {
        padding: 18px;
    }

    .mm-pill {
        font-size: 13px;
        padding: 7px 14px;
    }

    .mm-events-grid {
        grid-template-columns: 1fr;
    }

    .mm-lightbox {
        padding: 12px;
    }

    .mm-lightbox__close {
        top: 12px;
        right: 12px;
    }

    .mm-lightbox__prev {
        left: 8px;
        width: 44px;
        height: 44px;
    }

    .mm-lightbox__next {
        right: 8px;
        width: 44px;
        height: 44px;
    }

    .mm-lightbox__image {
        max-height: calc(100vh - 120px);
    }
}