:root {
    color-scheme: light;
    --bg-color: #ffffff;
    --text-color: #212529;
}

/* Mobile First adjustments (Bootstrap handles the rest) */
body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    /* Native font stack */
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Smooth transition */
}

/* Keep the default experience bright, including pages that previously used dark utility classes. */
#giftSearchForm {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

main .text-white {
    color: #212529 !important;
}

main .text-white-50 {
    color: #6c757d !important;
}

main .btn-outline-light {
    color: #0d6efd;
    border-color: #0d6efd;
}

main .btn-outline-light:hover,
main .btn-outline-light:focus {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.container {
    padding: 1rem;
}

h1 {
    text-align: center;
}

#mode-toggle {
    margin-top: 1rem;
}

.search-busy-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
}

.search-busy-modal.is-visible {
    display: flex;
}

.search-busy-content {
    min-width: 220px;
    padding: 2rem;
    text-align: center;
    color: #212529;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.location-busy-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 27, 42, 0.88);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 350ms ease, visibility 350ms ease;
}

.location-busy-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.location-busy-content {
    text-align: center;
}

.location-globe {
    display: inline-block;
    font-size: clamp(5rem, 18vw, 9rem);
    line-height: 1;
    animation: location-globe-spin 3s linear infinite;
}

@keyframes location-globe-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .location-busy-modal {
        transition-duration: 1ms;
    }

    .location-globe {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }
}

.event-result-image {
    height: auto;
    /*height: 180px;*/
    object-fit: cover;
}

.event-description {
    position: relative;
    line-height: 1.5;
}

.event-description-text {
    white-space: pre-line;
}

.event-description.is-collapsed .event-description-text {
    max-height: 4.5em;
    overflow: hidden;
}

.event-description-toggle {
    color: var(--bs-link-color);
    font: inherit;
    text-decoration: underline;
    border: 0;
    cursor: pointer;
}

.event-description.is-collapsed .event-description-toggle {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 0 0 0 3rem;
    background: linear-gradient(90deg, transparent, var(--bs-card-bg) 45%);
}

.collapsible-description {
    line-height: 1.5;
}

.collapsible-description-text {
    margin-bottom: 0;
}

.collapsible-description.is-collapsed .collapsible-description-text {
    max-height: 3em;
    overflow: hidden;
}

.site-footer {
    color: #fff;
    background: #212529;
}

.genre-links {
    display: grid;
    gap: 1.25rem;
}

.genre-group {
    margin: 0;
}

.genre-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-pill-list li {
    margin: 0;
}

#savedLocationControl {
    z-index:100;
}

/* Venue detail pages: keep the useful event content near the introduction. */
.venue-page {
    max-width: 1200px;
}

.venue-breadcrumb {
    margin-bottom: 1rem;
    overflow: hidden;
}

.venue-breadcrumb .breadcrumb {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.venue-breadcrumb .breadcrumb-item.active {
    overflow: hidden;
    text-overflow: ellipsis;
}

.venue-introduction {
    max-width: 760px;
}

.venue-introduction h1 {
    text-align: left;
    margin-bottom: 0.5rem;
}

.venue-address-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
}

.venue-address-actions address {
    min-width: 0;
}

.venue-address-actions #venueMapLink {
    display: inline-flex;
    align-items: center;
    line-height: inherit;
    white-space: nowrap;
}

.venue-address-actions #gettingThereLink {
    display: inline-flex;
    align-items: center;
    line-height: inherit;
    white-space: nowrap;
}

.venue-location-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.venue-location-links #venueMapLink,
.venue-location-links #gettingThereLink {
    min-height: 1.5rem;
}

.venue-location-links .bi {
    display: inline-block;
    width: 1.25rem;
    text-align: center;
}

.venue-events {
    margin-top: 2rem;
}

.venue-month-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.venue-events > h2 {
    margin-bottom: 1rem;
}

.venue-events #venueEvents {
    margin-top: 0;
}

.venue-getting-there {
    max-width: 760px;
    margin-top: 2rem;
}

.venue-getting-there-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(33, 37, 41, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.venue-getting-there-card h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.75rem;
    padding: 0.875rem 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f8f9fa, #fff);
}

.venue-transport-summary {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    font-weight: 400;
    text-align: right;
}

.venue-getting-there #venueTransport, .venue-getting-there #venueCarParks {
    padding: 0 1rem 1rem !important;
    line-height: 1.6;
}

.venue-getting-there #venueTransport strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--bs-body-color);
}

@media (max-width: 575.98px) {
    #homepageDiscoveryCarousel .carousel-item > div {
        align-items: center;
        flex-direction: column;
    }

    #homepageDiscoveryCarousel .carousel-item > div .btn {
        width: min(100%, 20rem);
    }

    .venue-page {
        padding-top: 1rem !important;
        padding-bottom: 2rem !important;
    }

    .venue-introduction h1 {
        font-size: calc(1.275rem + 1.2vw);
    }

    .venue-events {
        margin-top: 1.5rem;
    }

    .venue-events .card {
        padding: 0.75rem !important;
    }

    .venue-events #venueEvents {
        --bs-gutter-x: 0;
        --bs-gutter-y: 1rem;
    }

    .venue-transport-summary {
        display: none;
    }
}

/* Keep the homepage search tabs visually part of the light search card. */
#searchTabs {
    border-bottom: 0;
}

#searchTabs .nav-link {
    color: var(--bs-secondary-color);
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
}

#searchTabs .nav-link:hover,
#searchTabs .nav-link:focus-visible {
    color: var(--bs-primary);
    background: color-mix(in srgb, var(--bs-primary) 8%, transparent);
    border-bottom-color: transparent;
}

#searchTabs .nav-link.active {
    color: var(--bs-primary);
    background: transparent;
    border-bottom-color: var(--bs-primary);
}

#homepageDiscoveryCarousel .carousel-indicators button {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    height: 0.75rem;
    margin-inline: 0.35rem;
    width: 0.75rem;
}

#homepageDiscoveryCarousel .carousel-indicators .active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

#dynamic-pill {
    padding: 5px 15px;
    border-radius: 20px;
    background-color: #e0e0e0;
    color: white;
    transition: background-color 1s ease, color 1s ease;
    display: inline-block;
}
#dynamic-pill {
    display: inline-block;
    width: auto;
    white-space: nowrap;
    line-height: 1.3;
    vertical-align: baseline;
}

/* Keeps the normal line height even when the text is empty. */
#dynamic-pill::after {
    content: "\200B";
    /* Zero-width space */
}

@media (max-width: 1000px) {
    #dynamic-pill {
        display: table;
        margin: 0.25em auto 0;
    }
}
