/* ===================================================================
   Ethereal Confections Calendar — Public Styles
   =================================================================== */

:root {
    --ec-teal: #3D8C89;
    --ec-teal-light: #4ea8a4;
    --ec-gold: #C9A84C;
    --ec-gold-light: #d4b96a;
    --ec-purple: #8B6AAE;
    --ec-purple-light: #a68ac4;
    --ec-dark: #2c2c2c;
    --ec-muted: #6c757d;
    --ec-bg: #f8f7f4;
    --ec-card-bg: #ffffff;

    /* Radius scale */
    --ec-radius-sm: 8px;
    --ec-radius-md: 12px;
    --ec-radius-lg: 16px;
    --ec-radius-xl: 20px;
    --ec-radius-pill: 999px;

    /* Layered shadow system */
    --ec-shadow-xs: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --ec-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --ec-shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    --ec-shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.06);
    --ec-shadow-xl: 0 8px 24px rgba(0,0,0,0.1), 0 16px 48px rgba(0,0,0,0.08);

    /* Refined borders */
    --ec-border: #e8e5e0;
    --ec-border-light: #f0ede8;

    /* Hover/active tints */
    --ec-hover-bg: rgba(0, 0, 0, 0.025);
    --ec-active-bg: rgba(0, 0, 0, 0.05);

    /* Transitions */
    --ec-transition: 0.2s ease;
    --ec-transition-slow: 0.3s ease;
}

/* --- Layout --- */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--ec-bg);
    color: var(--ec-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cal-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cal-main {
    flex: 1;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* --- Header --- */
.cal-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ec-border-light);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.cal-brand a {
    color: var(--ec-dark);
}

.cal-brand a:hover {
    color: var(--ec-teal);
}

/* --- Legend --- */
.cal-legend {
    font-size: 0.8125rem;
    color: var(--ec-muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--ec-hover-bg);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-pill);
    padding: 0.2rem 0.6rem 0.2rem 0.45rem;
    transition: background var(--ec-transition);
}

.legend-item:hover {
    background: var(--ec-active-bg);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* --- Mobile Legend --- */
.cal-legend-mobile {
    font-size: 0.6875rem;
    color: var(--ec-muted);
}

.cal-legend-mobile .legend-dot {
    width: 8px;
    height: 8px;
}

/* --- Footer --- */
.cal-footer {
    padding: 1rem 0;
    border-top: 1px solid var(--ec-border-light);
}

.cal-footer a {
    text-decoration: none;
    transition: color var(--ec-transition);
}

.cal-footer a:hover {
    color: var(--ec-teal);
}

/* --- Custom Calendar --- */
.ec-cal {
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
}

/* Toolbar */
.ec-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.ec-toolbar-start,
.ec-toolbar-center {
    display: flex;
    align-items: center;
}

.ec-toolbar-end {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ec-toolbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 1rem;
    width: 11rem;
    text-align: center;
}

/* Buttons */
.ec-btn {
    background-color: var(--ec-teal);
    border: 1px solid var(--ec-teal);
    color: #fff;
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--ec-radius-md);
    box-shadow: var(--ec-shadow-xs);
    cursor: pointer;
    transition: all var(--ec-transition);
    line-height: 1.5;
}

.ec-btn:hover {
    background-color: var(--ec-teal-light);
    border-color: var(--ec-teal-light);
    transform: translateY(-1px);
    box-shadow: var(--ec-shadow-sm);
}

.ec-btn:active {
    background-color: #2d6b69;
    border-color: #2d6b69;
    transform: none;
}

.ec-btn:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(61, 140, 137, 0.25);
}

.ec-btn.active {
    background-color: #2d6b69;
    border-color: #2d6b69;
}

/* Prev/Next buttons */
.ec-prev-btn,
.ec-next-btn {
    font-size: 1.2rem;
    padding: 0.2rem 0.6rem;
    line-height: 1;
}

/* Button group */
.ec-btn-group {
    display: inline-flex;
}

.ec-btn-group .ec-btn {
    border-radius: 0;
}

.ec-btn-group .ec-btn:first-child {
    border-radius: var(--ec-radius-md) 0 0 var(--ec-radius-md);
}

.ec-btn-group .ec-btn:last-child {
    border-radius: 0 var(--ec-radius-md) var(--ec-radius-md) 0;
}

/* View Container */
.ec-view-container {
    flex: 1;
    min-height: 0;
}

/* === Grid View === */
.ec-grid {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--ec-radius-lg);
    overflow: hidden;
    box-shadow: var(--ec-shadow-sm);
    border: 1px solid var(--ec-border);
}

.ec-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--ec-border);
}

.ec-grid-header-cell {
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    color: var(--ec-muted);
    font-weight: 500;
    text-align: center;
    padding: 0.5rem 0;
}

.ec-grid-body {
    flex: 1;
    display: grid;
    grid-template-rows: repeat(6, 1fr);
}

.ec-grid-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--ec-border);
    min-height: 0;
}

.ec-grid-row:last-child {
    border-bottom: none;
}

.ec-grid-cell {
    border-right: 1px solid var(--ec-border);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.ec-grid-cell:last-child {
    border-right: none;
}

.ec-cell-frame {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ec-cell-top {
    flex: 0 0 auto;
    text-align: right;
    padding: 2px 4px;
}

.ec-day-number {
    font-weight: 500;
    font-size: 0.8125rem;
    transition: color var(--ec-transition);
}

/* Today highlight */
.ec-today {
    background-color: rgba(61, 140, 137, 0.05);
}

.ec-today .ec-day-number {
    background: var(--ec-teal);
    color: #fff;
    border-radius: var(--ec-radius-pill);
    padding: 0.15rem 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Other month days */
.ec-other-month {
    opacity: 0.35;
}

/* Day cell hover */
.ec-grid-cell:hover {
    background-color: var(--ec-hover-bg);
    transition: background-color var(--ec-transition);
}

/* Background image cells */
.ec-grid-cell.ec-has-bg {
    background-size: cover !important;
    background-position: center !important;
}

/* Sold-out overlay on day cell */
.ec-grid-cell.ec-sold-out::after {
    content: 'SOLD OUT';
    position: absolute;
    top: 6px;
    right: -20px;
    transform: rotate(35deg);
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 12px;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
}

/* Few-tickets overlay on day cell */
.ec-grid-cell.ec-few-tickets::after {
    content: 'FEW LEFT';
    position: absolute;
    top: 6px;
    right: -20px;
    transform: rotate(35deg);
    background: rgba(230, 168, 23, 0.9);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 12px;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(230, 168, 23, 0.3);
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
}

/* Event pills */
.ec-cell-events {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    gap: 1px;
    padding: 0 1px 1px;
}

.ec-event-pill {
    display: block;
    border-radius: var(--ec-radius-sm);
    padding: 2px 6px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    background-color: var(--ec-teal);
    box-shadow: var(--ec-shadow-xs);
    transition: all var(--ec-transition);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.ec-event-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--ec-shadow-sm);
    filter: brightness(1.08);
}

/* Past events */
.ec-event-pill.event-past,
.ec-list-event.event-past {
    opacity: 0.5;
    filter: grayscale(30%);
}

/* === List View === */
.ec-list {
    max-width: 500px;
    margin: 0 auto;
}

.ec-list-day-header {
    padding: 0.75rem 0 0.25rem 0;
}

.ec-list-day-text {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--ec-dark);
}

.ec-list-event {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--ec-card-bg);
    border-radius: var(--ec-radius-md);
    box-shadow: var(--ec-shadow-xs);
    border: 1px solid var(--ec-border-light);
    margin-bottom: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--ec-transition), transform var(--ec-transition);
}

.ec-list-event:hover {
    box-shadow: var(--ec-shadow-sm);
}

.ec-list-event:active {
    transform: scale(0.99);
}

.ec-list-thumb {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--ec-radius-md) var(--ec-radius-md) 0 0;
    display: block;
}

.ec-list-event-time {
    font-size: 0.9rem;
    color: var(--ec-muted);
    padding: 0.75rem 1rem 0;
}

.ec-list-event-title {
    font-size: 1.3rem;
    font-weight: 500;
    padding: 0.15rem 1rem 0.75rem;
}

.ec-color-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.ec-list-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0 1rem 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--ec-radius-pill);
    text-align: center;
}

.ec-list-badge.sold-out {
    background: #dc3545;
    color: #fff;
}

.ec-list-badge.few-tickets {
    background: #ffc107;
    color: #212529;
}

.ec-list-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ec-muted);
    font-size: 1rem;
}

/* --- Event Popover (desktop hover) --- */
.ec-popover {
    position: absolute;
    z-index: 1050;
    background: var(--ec-card-bg);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-lg);
    box-shadow: var(--ec-shadow-lg);
    padding: 0.75rem;
    width: 280px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--ec-transition), transform var(--ec-transition);
}

.ec-popover.show {
    opacity: 1;
    transform: translateY(0);
}

.ec-popover-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--ec-radius-md);
    margin-bottom: 0.5rem;
    box-shadow: var(--ec-shadow-xs);
}

.ec-popover-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.ec-popover-meta {
    font-size: 0.75rem;
    color: var(--ec-muted);
    margin-bottom: 0.35rem;
}

.ec-popover-badge {
    display: inline-block;
    font-size: 0.6875rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--ec-radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ec-popover-badge.ticketed {
    background-color: rgba(61, 140, 137, 0.12);
    color: var(--ec-teal);
}

.ec-popover-badge.public {
    background-color: rgba(201, 168, 76, 0.12);
    color: var(--ec-gold);
}

.ec-popover-badge.reservation {
    background-color: rgba(139, 106, 174, 0.12);
    color: var(--ec-purple);
}

.ec-popover-badge.sold-out {
    background-color: rgba(108, 117, 125, 0.12);
    color: var(--ec-muted);
}

.ec-popover-badge.few-tickets {
    background-color: rgba(230, 168, 23, 0.12);
    color: #b8860b;
}

.ec-popover-badge.info {
    background-color: rgba(108, 117, 125, 0.12);
    color: var(--ec-muted);
}

/* --- Event Detail Modal --- */
.modal-content {
    border: none;
    border-radius: var(--ec-radius-xl);
    box-shadow: var(--ec-shadow-xl);
    overflow: hidden;
}

.event-modal-image {
    position: relative;
    overflow: hidden;
}

.event-modal-image img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--ec-radius-lg);
    box-shadow: var(--ec-shadow-sm);
    transition: transform var(--ec-transition-slow);
}

.event-modal-image img:hover {
    transform: scale(1.01);
}

.event-sold-out-banner, .event-few-tickets-banner {
    position: absolute;
    top: 24px;
    right: -40px;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 50px;
    transform: rotate(35deg);
    z-index: 2;
}

.event-sold-out-banner {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.event-few-tickets-banner {
    background: linear-gradient(135deg, #e6a817, #d4960f);
    box-shadow: 0 2px 8px rgba(230, 168, 23, 0.4);
}

.event-description {
    line-height: 1.6;
    color: #444;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-md);
    padding: 1rem;
}

.event-description p:last-child {
    margin-bottom: 0;
}

/* Series list in modal */
.event-series {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-md);
    padding: 0.75rem;
}

.event-series .list-group-item {
    padding: 0.5rem 0;
    border-color: var(--ec-border-light);
}

.event-series .series-date {
    font-size: 0.8125rem;
    color: var(--ec-muted);
}

.event-series .series-title {
    font-weight: 500;
}

/* Ticket button */
.btn-primary {
    background-color: var(--ec-teal);
    border-color: var(--ec-teal);
    border-radius: var(--ec-radius-md);
    box-shadow: 0 2px 8px rgba(61, 140, 137, 0.25);
    transition: all var(--ec-transition);
}

.btn-primary:hover {
    background-color: var(--ec-teal-light);
    border-color: var(--ec-teal-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61, 140, 137, 0.3);
}

/* Qty picker buttons */
.btn-outline-secondary {
    border-radius: var(--ec-radius-pill);
}

/* Sold-out ticket button */
.btn-sold-out {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
    border-radius: var(--ec-radius-md);
}

.btn-sold-out:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* --- Mobile Responsive --- */
@media (max-width: 767.98px) {
    .ec-toolbar-title {
        font-size: 1.1rem;
    }

    .ec-btn {
        font-size: 1.1rem;
        padding: 0.6rem 1.1rem;
        min-height: 48px;
    }

    .ec-toolbar-center {
        justify-content: center;
        width: 100%;
        gap: 0.25rem;
    }

    .cal-header {
        padding: 0.5rem 0;
    }

    .cal-brand h1 {
        font-size: 1rem;
    }

    .event-modal-image img {
        max-height: 250px;
    }
}

/* --- Full-Screen Modal (phones) --- */
@media (max-width: 575.98px) {
    /* Safe-area padding for notched iPhones */
    .modal-fullscreen-sm-down .modal-body {
        padding-left: calc(1rem + env(safe-area-inset-left));
        padding-right: calc(1rem + env(safe-area-inset-right));
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .modal-fullscreen-sm-down .modal-header {
        padding-top: calc(0.5rem + env(safe-area-inset-top));
    }

    /* Larger close button hit area */
    .modal-fullscreen-sm-down .btn-close {
        padding: 1rem;
        margin: -0.5rem -0.5rem -0.5rem auto;
    }

    /* Sticky CTA buttons */
    #eventModalTicket,
    #eventModalReservation {
        position: sticky;
        bottom: 0;
        background: var(--ec-card-bg);
        padding-top: 0.75rem;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 1;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    }

    /* Series pagination: bigger touch targets */
    .event-series .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Touch: eliminate 300ms tap delay */
.ec-event-pill,
.ec-list-event,
.ec-btn,
.ec-grid-cell.ec-clickable-cell {
    touch-action: manipulation;
}

/* --- AJAX Event Detail Modal --- */
.ec-detail-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1055;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
}

.ec-detail-modal.show {
    display: block;
}

.ec-detail-modal .modal-content {
    border: none;
    border-radius: var(--ec-radius-xl);
    box-shadow: var(--ec-shadow-xl);
    overflow: hidden;
}

.ec-detail-modal .modal-header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    border: none;
    background: transparent;
}

.ec-detail-modal .modal-body {
    padding: 1.5rem;
}

.ec-detail-modal .modal-body .spinner-border {
    color: var(--ec-teal);
}

.ec-detail-image {
    overflow: hidden;
    border-radius: var(--ec-radius-lg);
    margin-bottom: 1rem;
}

.ec-detail-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--ec-radius-lg);
    box-shadow: var(--ec-shadow-sm);
}

.ec-detail-image .ec-detail-banner {
    position: absolute;
    top: 24px;
    right: -40px;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 50px;
    transform: rotate(35deg);
    z-index: 2;
    pointer-events: none;
}

.ec-detail-banner.sold-out {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.ec-detail-banner.few-tickets {
    background: linear-gradient(135deg, #e6a817, #d4960f);
    box-shadow: 0 2px 8px rgba(230, 168, 23, 0.4);
}

.ec-detail-modal .event-description {
    line-height: 1.6;
    color: #444;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-md);
    padding: 1rem;
}

.ec-detail-modal .event-description p:last-child {
    margin-bottom: 0;
}

.ec-detail-modal .ec-detail-youtube {
    border-radius: var(--ec-radius-md);
    overflow: hidden;
}

.ec-detail-modal .ec-detail-series {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-md);
    padding: 0.75rem;
}

.ec-detail-modal .ec-detail-series .list-group-item {
    padding: 0.5rem 0;
    border-color: var(--ec-border-light);
    cursor: pointer;
}

.ec-detail-modal .ec-detail-series .list-group-item:hover {
    background-color: var(--ec-hover-bg);
}

/* Sticky CTA for fullscreen mobile modal */
@media (max-width: 575.98px) {
    .ec-detail-modal .modal-body {
        padding-left: calc(1rem + env(safe-area-inset-left));
        padding-right: calc(1rem + env(safe-area-inset-right));
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .ec-detail-modal .modal-header {
        padding-top: calc(0.5rem + env(safe-area-inset-top));
    }

    .ec-detail-modal .btn-close {
        padding: 1rem;
        margin: -0.5rem -0.5rem -0.5rem auto;
    }

    .ec-detail-modal .ec-detail-ticket,
    .ec-detail-modal .ec-detail-reservation {
        position: sticky;
        bottom: 0;
        background: var(--ec-card-bg);
        padding-top: 0.75rem;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 1;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    }

    .ec-detail-image img {
        max-height: 250px;
    }
}

/* --- Mobile Inline Detail View --- */
.ec-mobile-detail {
    padding: 0 0.5rem 2rem;
}

.ec-mobile-detail-header {
    padding: 0.75rem 0;
}

.ec-mobile-back {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.ec-mobile-detail .ec-detail-image img {
    max-height: 300px;
}

.ec-mobile-detail .event-description {
    line-height: 1.6;
    color: #444;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-md);
    padding: 1rem;
}

.ec-mobile-detail .event-description p:last-child {
    margin-bottom: 0;
}

.ec-mobile-detail .ec-detail-youtube {
    border-radius: var(--ec-radius-md);
    overflow: hidden;
}

.ec-mobile-detail .ec-detail-series {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-md);
    padding: 0.75rem;
}

.ec-mobile-detail .ec-detail-series .list-group-item {
    padding: 0.5rem 0;
    border-color: var(--ec-border-light);
    cursor: pointer;
}

.ec-mobile-detail .ec-detail-series .list-group-item:hover {
    background-color: var(--ec-hover-bg);
}

.ec-mobile-detail .ec-detail-ticket,
.ec-mobile-detail .ec-detail-reservation {
    position: sticky;
    bottom: 0;
    background: var(--ec-card-bg);
    padding-top: 0.75rem;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}

/* --- Embed-specific --- */

.ec-embed .cal-main {
    padding-top: 0;
    padding-bottom: 0;
}

.ec-embed .ec-grid {
    min-height: 900px;
    overflow: clip;
}

.ec-embed .ec-mobile-detail,
.ec-embed .ec-res-inline {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

@media (max-width: 767.98px) {
    .ec-embed .ec-mobile-detail,
    .ec-embed .ec-res-inline {
        max-width: 100%;
        padding: 0 0.5rem;
    }
}


/* --- Accessibility --- */
*:focus-visible {
    outline: 2px solid var(--ec-teal);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .ec-btn:hover,
    .ec-event-pill:hover,
    .event-modal-image img:hover,
    .btn-primary:hover {
        transform: none !important;
    }
}

/* --- Loading Spinner --- */
.cal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.cal-loading .spinner-border {
    color: var(--ec-teal);
    border-width: 0.2em;
    width: 2rem;
    height: 2rem;
}
