/* ============================================
   Comedy Bar – Eventbrite Events Styles
   eventbrite-events.css
   ============================================ */

/* ── Grid layout ─────────────────────────── */

.cb-events-wrapper {
    container-type: inline-size;
    width: 100%;
}

.cb-events-grid {
    display: grid;
    gap: 24px;
    padding: 24px 0;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(var(--cb-cols-4, 4), 1fr);
}

@container (max-width: 1050px) {
    .cb-events-grid {
        grid-template-columns: repeat(var(--cb-cols-3, 3), 1fr);
    }
}

@container (max-width: 620px) {
    .cb-events-grid {
        grid-template-columns: repeat(var(--cb-cols-2, 2), 1fr);
    }
}

@container (max-width: 400px) {
    .cb-events-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card ────────────────────────────────── */

.cb-event-card {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cb-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.cb-event-card.cb-event-sold-out {
    opacity: 0.7;
}

/* ── Event image ─────────────────────────── */

.cb-event-image-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #111;
}

.cb-event-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cb-event-card:hover .cb-event-image-wrap img {
    transform: scale(1.03);
}

/* ── Body (date badge + info) ────────────── */

.cb-event-body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px 10px;
    flex: 1;
}

/* ── Date badge ──────────────────────────── */

.cb-event-date-badge {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    padding: 6px 4px;
    line-height: 1;
}

.cb-event-month {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #f27c27;           /* Comedy Bar red */
    text-transform: uppercase;
    margin-bottom: 4px;
}

.cb-event-day {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

/* ── Info block ──────────────────────────── */

.cb-event-info {
    flex: 1;
    min-width: 0;
}

.cb-event-when {
    font-size: 12px;
    color: #888;
    margin: 0;
    padding-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cb-event-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0;
}

.cb-event-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s;
}

.cb-event-title a:hover {
    color: #f27c27;
}

.cb-event-desc {
    font-size: 13px;
    color: #aaa;
    line-height: 1.5;
    margin: 0;
    padding-bottom: 0;
}

/* ── Footer / CTA ────────────────────────── */

.cb-event-footer {
    padding: 10px 0 4px;
}

.cb-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.cb-btn-buy {
    background: #f27c27;
    color: #fff;
    border: 2px solid #f27c27;
}

.cb-btn-buy:hover {
    background: #d96a18;
    border-color: #d96a18;
    color: #fff;
}

.cb-btn-soldout {
    background: transparent;
    color: #666;
    border: 2px solid #444;
    cursor: default;
}

/* ── Error / empty states ────────────────── */

.cb-events-error,
.cb-events-empty {
    color: #aaa;
    font-style: italic;
    padding: 24px 0;
    text-align: center;
}

.cb-events-error a {
    color: #f27c27;
}

/* ── Responsive ──────────────────────────── */

/* ── Responsive handled in grid definition above ── */


/* ============================================
   Embedded Checkout Modal
   ============================================ */

.cb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    align-items: flex-start;
    justify-content: center;
    isolation: isolate;
}

.cb-modal.cb-modal-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.cb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
    z-index: 2147483645;
}

.cb-modal-box {
    position: relative;
    z-index: 2147483646;
    background: #fff;
    border-radius: 8px;
    width: 95%;
    max-width: 700px;
    height: calc(100vh - 130px);
    max-height: calc(100vh - 130px);
    margin-top: 120px;
    margin-bottom: 10px;
    overflow-y: auto;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* Mobile */
@media (max-width: 768px) {
    .cb-modal-box {
        width: 100%;
        border-radius: 8px 8px 0 0;
        height: calc(100vh - 120px);
        max-height: calc(100vh - 120px);
        margin-top: 110px;
        margin-bottom: 0;
    }
}

#cb-checkout-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#cb-checkout-container iframe {
    flex: 1;
    min-height: 0;
    height: 100% !important;
}

.cb-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}

.cb-modal-close:hover {
    color: #000;
}

#cb-checkout-container {
    min-height: 400px;
}

#cb-checkout-container iframe {
    width: 100% !important;
    border: none;
}

.cb-order-complete {
    text-align: center;
    padding: 60px 20px;
    color: #111;
}

.cb-order-complete h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.cb-order-complete p {
    font-size: 16px;
    color: #555;
}

/* Make Buy Tickets a button instead of a link */
.cb-btn-buy {
    border: none;
    cursor: pointer;
    font-family: inherit;
}


/* ============================================
   Modal Loader
   ============================================ */

.cb-checkout-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 500px;
    background: #1a1a1a;
    border-radius: 6px;
    gap: 16px;
    padding: 40px 20px;
}

.cb-loader-logo {
    width: 180px;
    max-width: 60%;
    height: auto;
    opacity: 0.95;
}

.cb-loader-tagline {
    color: #aaa;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

/* Animated dots */
.cb-loader-dots {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.cb-loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f27c27;
    animation: cb-dot-pulse 1.2s ease-in-out infinite;
}

.cb-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.cb-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cb-dot-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1.0); opacity: 1.0; }
}


/* ============================================
   Info / Detail Modal
   ============================================ */

.cb-info-modal-box {
    max-width: 760px;
    padding: 0;
    overflow: hidden;
    display: block; /* override flex from checkout modal */
    height: auto;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}

@media (max-width: 768px) {
    .cb-info-modal-box {
        max-height: calc(100vh - 120px);
    }
}

.cb-info-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #111;
}

.cb-info-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cb-info-body {
    padding: 28px 28px 32px;
}

.cb-info-title {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.2;
    padding-right: 24px; /* clear the X button */
}

.cb-info-datetime {
    font-size: 14px;
    color: #555;
    margin: 0 0 12px;
    font-weight: 600;
}

.cb-info-venue {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px;
    line-height: 1.5;
}

.cb-info-desc {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    margin: 0 0 20px;
    white-space: pre-line;
}

.cb-info-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px;
}

.cb-info-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cb-btn-lg {
    padding: 12px 32px;
    font-size: 15px;
}

.cb-desc-loading {
    color: #999;
    font-style: italic;
    font-size: 14px;
}
