/*
 * Compact three-column Bandsintown layout for both homepage event sections.
 *
 * Layout at every viewport width:
 *   date | city + venue | ticket / notify button
 *
 * The selectors are limited to the desktop homepage widget and the separate
 * #events-mobile widget. The booking lightbox and /events/ page are untouched.
 */

.tourdates-home-compact,
.tourdates-home-compact > div,
.tourdates-home-compact .bit-widget,
.tourdates-home-compact .bit-upcoming-events,
.tourdates-home-compact .bit-past-events,
#events-mobile .tourdates,
#events-mobile .tourdates > div,
#events-mobile .tourdates .bit-widget,
#events-mobile .tourdates .bit-upcoming-events,
#events-mobile .tourdates .bit-past-events {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.tourdates-home-compact .bit-widget,
.tourdates-home-compact .bit-widget *,
.tourdates-home-compact .bit-widget *::before,
.tourdates-home-compact .bit-widget *::after,
#events-mobile .tourdates .bit-widget,
#events-mobile .tourdates .bit-widget *,
#events-mobile .tourdates .bit-widget *::before,
#events-mobile .tourdates .bit-widget *::after {
    box-sizing: border-box;
}

.tourdates-home-compact,
.tourdates-home-compact.bit-widget,
#events-mobile .tourdates,
#events-mobile .tourdates.bit-widget {
    max-width: 531px !important;
}

.tourdates-home-compact .bit-widget,
#events-mobile .tourdates .bit-widget {
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
}

/* Three columns at all widths: date | city + venue | button. */
.tourdates-home-compact .bit-widget .bit-event,
.tourdates-home-compact .bit-widget.bit-layout-ipad .bit-event,
#events-mobile .tourdates .bit-widget .bit-event,
#events-mobile .tourdates .bit-widget.bit-layout-ipad .bit-event {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) 72px !important;
    column-gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 14px 0 !important;
    color: #ffffff !important;
    background: transparent !important;
    overflow: visible !important;
}

.tourdates-home-compact .bit-widget .bit-event > *,
#events-mobile .tourdates .bit-widget .bit-event > * {
    min-width: 0 !important;
}

/*
 * This widget build stores the usable date inside the mobile wrapper at both
 * desktop and mobile sizes. Keep that wrapper visible and suppress .bit-date,
 * otherwise the date either disappears or appears twice.
 */
.tourdates-home-compact .bit-widget .bit-event > .bit-mobile-date-and-share-wrapper,
#events-mobile .tourdates .bit-widget .bit-event > .bit-mobile-date-and-share-wrapper {
    display: block !important;
    grid-column: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: start !important;
}

.tourdates-home-compact .bit-widget .bit-mobile-date,
#events-mobile .tourdates .bit-widget .bit-mobile-date {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: left !important;
    text-transform: uppercase !important;
}

.tourdates-home-compact .bit-widget .bit-date,
.tourdates-home-compact .bit-widget .bit-share-links,
#events-mobile .tourdates .bit-widget .bit-date,
#events-mobile .tourdates .bit-widget .bit-share-links {
    display: none !important;
}

/* City and venue share the flexible middle column. */
.tourdates-home-compact .bit-widget .bit-event > .bit-details,
#events-mobile .tourdates .bit-widget .bit-event > .bit-details {
    display: block !important;
    grid-column: 2 !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: start !important;
    text-align: left !important;
}

.tourdates-home-compact .bit-widget .bit-location,
.tourdates-home-compact .bit-widget .bit-venue,
#events-mobile .tourdates .bit-widget .bit-location,
#events-mobile .tourdates .bit-widget .bit-venue {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-align: left !important;
}

.tourdates-home-compact .bit-widget .bit-venue,
#events-mobile .tourdates .bit-widget .bit-venue {
    margin-top: 2px !important;
}

.tourdates-home-compact .bit-widget .bit-event > .bit-event-buttons,
#events-mobile .tourdates .bit-widget .bit-event > .bit-event-buttons {
    display: flex !important;
    grid-column: 3 !important;
    justify-content: flex-end !important;
    align-items: center !important;
    align-self: center !important;
    width: 72px !important;
    max-width: 72px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 10px 0 0 !important;
    gap: 0 !important;
}

/* Keep one CTA in the final column. */
.tourdates-home-compact .bit-widget .bit-rsvp-container,
.tourdates-home-compact .bit-widget .bit-rsvp,
#events-mobile .tourdates .bit-widget .bit-rsvp-container,
#events-mobile .tourdates .bit-widget .bit-rsvp {
    display: none !important;
}

.tourdates-home-compact .bit-widget .bit-offers-container,
.tourdates-home-compact .bit-widget .bit-offers-inner-wrapper,
#events-mobile .tourdates .bit-widget .bit-offers-container,
#events-mobile .tourdates .bit-widget .bit-offers-inner-wrapper {
    display: block !important;
    width: 72px !important;
    max-width: 72px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tourdates-home-compact .bit-widget .bit-event .bit-button,
.tourdates-home-compact .bit-widget .bit-event .bit-offers,
#events-mobile .tourdates .bit-widget .bit-event .bit-button,
#events-mobile .tourdates .bit-widget .bit-event .bit-offers {
    display: block !important;
    width: 72px !important;
    max-width: 72px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 7px 3px !important;
    border: 1px solid #e6cd79 !important;
    border-radius: 4px !important;
    background: #e6cd79 !important;
    color: #355f9e !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.tourdates-home-compact .bit-widget .bit-event .bit-button:hover,
.tourdates-home-compact .bit-widget .bit-event .bit-offers:hover,
#events-mobile .tourdates .bit-widget .bit-event .bit-button:hover,
#events-mobile .tourdates .bit-widget .bit-event .bit-offers:hover {
    opacity: 1 !important;
    background: #ffffff !important;
    color: #355f9e !important;
}

.tourdates-home-compact .bit-widget .bit-event:hover,
.tourdates-home-compact .bit-widget.bit-layout-ipad .bit-event:hover,
#events-mobile .tourdates .bit-widget .bit-event:hover,
#events-mobile .tourdates .bit-widget.bit-layout-ipad .bit-event:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.tourdates-home-compact .bit-widget .bit-upcoming-events-show-all-button,
#events-mobile .tourdates .bit-widget .bit-upcoming-events-show-all-button {
    width: 100% !important;
    max-width: 100% !important;
    margin: 14px 0 0 !important;
    border: 1px solid #e6cd79 !important;
    background: #ffffff !important;
    color: #355f9e !important;
    font-size: 14px !important;
}

.tourdates-home-compact .bit-widget a,
#events-mobile .tourdates .bit-widget a {
    color: #ffffff !important;
}

/* Keep the same three-column structure on narrow phones, only tighten it. */
@media (max-width: 600px) {
    .tourdates-home-compact .bit-widget .bit-event,
    .tourdates-home-compact .bit-widget.bit-layout-ipad .bit-event,
    #events-mobile .tourdates .bit-widget .bit-event,
    #events-mobile .tourdates .bit-widget.bit-layout-ipad .bit-event {
        grid-template-columns: 100px minmax(0, 1fr) 62px !important;
        column-gap: 6px !important;
        padding: 10px 0 !important;
    }

    .tourdates-home-compact .bit-widget,
    .tourdates-home-compact .bit-widget .bit-mobile-date,
    .tourdates-home-compact .bit-widget .bit-location,
    .tourdates-home-compact .bit-widget .bit-venue,
    #events-mobile .tourdates .bit-widget,
    #events-mobile .tourdates .bit-widget .bit-mobile-date,
    #events-mobile .tourdates .bit-widget .bit-location,
    #events-mobile .tourdates .bit-widget .bit-venue {
        font-size: 14px !important;
    }

    .tourdates-home-compact .bit-widget .bit-event > .bit-event-buttons,
    .tourdates-home-compact .bit-widget .bit-offers-container,
    .tourdates-home-compact .bit-widget .bit-offers-inner-wrapper,
    .tourdates-home-compact .bit-widget .bit-event .bit-button,
    .tourdates-home-compact .bit-widget .bit-event .bit-offers,
    #events-mobile .tourdates .bit-widget .bit-event > .bit-event-buttons,
    #events-mobile .tourdates .bit-widget .bit-offers-container,
    #events-mobile .tourdates .bit-widget .bit-offers-inner-wrapper,
    #events-mobile .tourdates .bit-widget .bit-event .bit-button,
    #events-mobile .tourdates .bit-widget .bit-event .bit-offers {
        width: 72px !important;
        max-width: 72px !important;
    }

    .tourdates-home-compact .bit-widget .bit-event .bit-button,
    .tourdates-home-compact .bit-widget .bit-event .bit-offers,
    #events-mobile .tourdates .bit-widget .bit-event .bit-button,
    #events-mobile .tourdates .bit-widget .bit-event .bit-offers {
        margin: 0 !important;
        padding: 6px 2px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 360px) {
    .tourdates-home-compact .bit-widget .bit-event,
    .tourdates-home-compact .bit-widget.bit-layout-ipad .bit-event,
    #events-mobile .tourdates .bit-widget .bit-event,
    #events-mobile .tourdates .bit-widget.bit-layout-ipad .bit-event {
        grid-template-columns: 68px minmax(0, 1fr) 58px !important;
        column-gap: 4px !important;
    }

    .tourdates-home-compact .bit-widget .bit-event > .bit-event-buttons,
    .tourdates-home-compact .bit-widget .bit-offers-container,
    .tourdates-home-compact .bit-widget .bit-offers-inner-wrapper,
    .tourdates-home-compact .bit-widget .bit-event .bit-button,
    .tourdates-home-compact .bit-widget .bit-event .bit-offers,
    #events-mobile .tourdates .bit-widget .bit-event > .bit-event-buttons,
    #events-mobile .tourdates .bit-widget .bit-offers-container,
    #events-mobile .tourdates .bit-widget .bit-offers-inner-wrapper,
    #events-mobile .tourdates .bit-widget .bit-event .bit-button,
    #events-mobile .tourdates .bit-widget .bit-event .bit-offers {
        width: 58px !important;
        max-width: 58px !important;
    }
}

/* Optional lightbox colour override, only used if that widget gets this class. */
.tourdates-home-compact.lightboxtour .bit-widget,
.tourdates-home-compact.lightboxtour .bit-widget a,
.tourdates-home-compact.lightboxtour .bit-widget .bit-event,
.tourdates-home-compact.lightboxtour .bit-widget .bit-mobile-date,
.tourdates-home-compact.lightboxtour .bit-widget .bit-location,
.tourdates-home-compact.lightboxtour .bit-widget .bit-venue {
    color: #2a2a2a !important;
}
