/* Event Page Specific Styles */

/* Desktop layout */
.layout-container {
    grid-template-columns: 1fr 450px;
    grid-template-rows: 1fr;
}

.event-main {
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    height: 100%;
}

.event-sidebar {
    background-color: transparent;
    padding: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
    min-height: 0;
    height: 100%;
}

.event-details-card {
    display: flex;
    gap: 20px;
    width: 100%;
    height: 300px;
}

.event-image-container {
    width: 276px;
    height: 276px;
    overflow: hidden;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    flex-shrink: 0;
}

.event-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.event-info-section .info-chip {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.event-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.event-info-row .info-chip,
.event-info-row .colored-chip {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.event-info-row .colored-chip-inner {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artists-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.artist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 12px;
    background-color: var(--surface);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
}

/* Stage groups — when an event's lineup is split across a venue's rooms.
   Each group is self-contained: its own header and its own artist list, so the
   B2B chip's absolute positioning resets per group instead of being computed
   from a running index across the whole lineup.

   Events with no stage data render exactly as before: no groups, no headers. */
.stage-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.artists-container .stage-group + .stage-group {
    margin-top: 5px; /* 10px container gap + 5px = 15px between groups */
}

/* Reuses the .colored-chip.success palette from shared-styles.css (--success at
   22%), sized to match .info-chip.size-md, but stretched full width so it reads
   as a section header rather than a floating pill. */
.stage-header {
    margin: 0; /* it's an <h3>; kill the UA heading margins, gap handles spacing */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 15px;
    border-radius: 7px;
    background-color: rgba(76, 175, 80, 0.3);
    color: var(--success);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Same frosted backing as .b2b-chip — the blur plate is what lifts a
       translucent chip off whatever is behind it. */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* B2B chip — CTA-button shape from header.html, but in primary blue
   (--secondary) and translucent. Hangs into the gap between two chained
   artist cards; only the non-tail position in each chain gets one. */
.b2b-chip {
    position: absolute;
    right: 20px;
    bottom: -27px;
    background-color: rgba(33, 65, 243, 0.3);
    color: var(--secondary);
    height: 45px;
    padding: 0 24px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Mobile cards have a 15px margin-bottom instead of the desktop 10px gap,
   so push the chip ~3px lower to stay centred on the seam. */
.b2b-chip-mobile {
    bottom: -30px;
}

.artist-item .info-chip {
    max-width: calc(100% - 90px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-item img {
    width: 70px;
    height: 70px;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
}

.ticket-button {
    width: 100%;
    background-color: var(--secondary);
    color: var(--text);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-top: auto;
}

.ticket-button:hover {
    transform: translateY(-2px);
}

#map {
    width: 100%;
    height: 500px;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Mobile-specific styles */
.mobile-event-container {
    display: none;
}

.mobile-event-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
}

.mobile-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-event-info-card {
    background-color: var(--surface);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
}

.mobile-event-title {
    margin-bottom: 10px;
}

.mobile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.mobile-info-row:last-child {
    margin-bottom: 0;
}

.mobile-info-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
}

.mobile-info-left .info-chip,
.mobile-info-left .colored-chip {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mobile-info-left .colored-chip-inner {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-info-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
    min-width: 0;
    flex-shrink: 0;
}

.mobile-info-right .info-chip {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-map {
    width: 100%;
    height: 250px;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Below 1200px width: Switch to square image layout with details below */
@media (max-width: 1200px) {
    .event-details-card {
        flex-direction: column;
        height: auto;
        gap: 0;
    }

    .event-image-container {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        margin-bottom: 10px;
    }

    .event-info-section {
        width: 100%;
    }
}

/* Tablet and Mobile responsive */
@media (max-width: 1024px) {
    .layout-container {
        display: none;
    }

    .main-content {
        padding-bottom: 20px;
        padding-top: calc(var(--header-height) + 20px);
        min-height: auto;
    }

    .page-container {
        padding: 0;
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }

    .mobile-event-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: relative;
        min-height: calc(100vh - var(--header-height) - 40px);
        background-color: rgba(10, 10, 10, 0.5);
        border-radius: 10px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px;
        margin: 0 15px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .mobile-event-container::-webkit-scrollbar {
        display: none;
    }

    .mobile-event-container > * {
        margin-bottom: 0;
    }

    .mobile-event-container .card {
        background-color: var(--surface);
        border-radius: 10px;
        padding: 14px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.2);
        margin-bottom: 0;
    }

    .mobile-event-container .description-text {
        padding: 14px;
    }

    /* Mobile artist cards are full-width siblings with their own side margins,
       so the header has to line up with them rather than the container edge. */
    .mobile-event-container .stage-header-mobile {
        margin: 15px 15px 10px;
        width: calc(100% - 30px);
    }

    .mobile-event-container .stage-header-mobile:first-child {
        margin-top: 10px;
    }

    .mobile-event-container .artist-first {
        margin-top: 10px;
    }

    .mobile-event-container .artist-last {
        margin-bottom: 10px;
    }

    footer {
        position: relative;
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-top: calc(65px + 20px);
    }

    .page-container {
        padding: 0;
    }

    .mobile-event-container {
        min-height: calc(100vh - 65px - 40px);
        padding: 8px;
        margin: 0 15px;
        gap: 10px;
    }

    .mobile-event-container .card {
        padding: 10px;
    }

    .mobile-event-info-card {
        padding: 10px;
    }

    .artist-item {
        padding: 10px;
    }

    .artist-item img {
        width: 60px;
        height: 60px;
    }

    .artist-item .info-chip {
        max-width: calc(100% - 70px);
    }

    .ticket-button {
        font-size: 14px;
        padding: 8px 12px;
    }

    footer {
        margin-top: 20px;
    }
}
