﻿/* ==========================================================================
	BUSINESS SLIDEOUT — BASE (DROP-IN REPLACEMENT)
	- Photos: single + carousel (no crop, no jump)
	- Photo credit pill (below image)
	- Slideout carousel UI (prev/next, dots, play/pause)
	- Layout 1 grid + Practical Info + Parking pills
	- Why Visit: line clamp + toggle (JS decides visibility)
========================================================================== */

/* ==========================================================================
	1) PHOTO BASE — SINGLE + CAROUSEL
========================================================================== */

/* Base spacing + viewport var */
.business-carousel,
.single-photo-wrapper {
    margin-bottom: 1rem;
    --biz-photo-vh: 520px;
}

@media (max-width: 768px) {
    .business-carousel,
    .single-photo-wrapper {
        --biz-photo-vh: 280px;
    }
}

/* Bootstrap carousel backstop (we hide default UI elsewhere) */
.business-carousel .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.business-carousel .carousel-item {
    position: relative;
    display: none;
    float: left;
    width: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
    transition: transform .6s ease-in-out;
}

    .business-carousel .carousel-item.active,
    .business-carousel .carousel-item-next,
    .business-carousel .carousel-item-prev {
        display: block;
    }

/* Hide Bootstrap’s default indicators/controls (we use custom UI) */
.business-carousel .carousel-indicators,
.business-carousel .carousel-control-prev,
.business-carousel .carousel-control-next {
    display: none !important;
}

/* Photo stage (fixed height via CSS var, no jump) */
.business-carousel .photo-frame,
.single-photo-wrapper .photo-frame {
    height: var(--biz-photo-vh, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .business-carousel .photo-frame,
[data-bs-theme="dark"] .single-photo-wrapper .photo-frame {
    background-color: transparent !important;
}

/* The .photo-fit wrapper should NOT be a sizing actor */
.business-carousel .photo-fit,
.single-photo-wrapper .photo-fit {
    display: contents;
}

/* Images: contain, never crop, scale up/down, obey stage height */
.business-carousel .photo-frame img,
.single-photo-wrapper .photo-frame img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: var(--biz-photo-vh, 520px) !important;
    object-fit: contain !important;
    object-position: center;
    border-radius: 12px;
    background: transparent;
    border: 2px solid rgba(0,0,0,.52);
}

[data-bs-theme="dark"] .business-carousel .photo-frame img,
[data-bs-theme="dark"] .single-photo-wrapper .photo-frame img {
    border-color: rgba(255,255,255,.52);
}

/* Hide “unavailable” overlay text (JS fallback image handles UX) */
.single-photo-wrapper .attraction-img-unavailable-text,
.business-carousel .attraction-img-unavailable-text {
    display: none;
}

/* ==========================================================================
	2) PHOTO CREDIT PILL (below image)
	Assumes:
	- Single:  .single-photo-wrapper > .photo-credit
	- Carousel: .carousel-item > .photo-credit
========================================================================== */

.single-photo-wrapper,
.business-carousel {
    position: relative;
}

    .single-photo-wrapper > .photo-credit,
    .business-carousel .carousel-item > .photo-credit {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        margin-top: .6rem;
        padding: .28rem .6rem;
        font-size: .72rem;
        line-height: 1.15;
        letter-spacing: .01em;
        border-radius: 999px;
        border: 1px solid rgba(0,0,0,.14);
        background: rgba(0,0,0,.04);
        color: rgba(0,0,0,.78);
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
        text-wrap: pretty;
        /* ensure it isn't treated as an overlay by legacy rules */
        position: static !important;
        inset: auto !important;
        z-index: auto !important;
    }

[data-bs-theme="dark"] .single-photo-wrapper > .photo-credit,
[data-bs-theme="dark"] .business-carousel .carousel-item > .photo-credit {
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.82);
}

.single-photo-wrapper > .photo-credit a,
.business-carousel .carousel-item > .photo-credit a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    border-bottom-color: rgba(0,0,0,.35);
}

[data-bs-theme="dark"] .single-photo-wrapper > .photo-credit a,
[data-bs-theme="dark"] .business-carousel .carousel-item > .photo-credit a {
    border-bottom-color: rgba(255,255,255,.35);
}

.single-photo-wrapper > .photo-credit a:hover,
.business-carousel .carousel-item > .photo-credit a:hover {
    border-bottom-color: currentColor;
}

/* ==========================================================================
	3) SLIDEOUT CAROUSEL UI (custom controls)
========================================================================== */

.business-carousel {
    position: relative;
}

    /* Prev/next hints */
    .business-carousel .carousel-hint {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 38px;
        height: 38px;
        border-radius: 999px;
        border: 0;
        background: rgba(0,0,0,.04);
        color: #fff;
        display: grid;
        place-items: center;
        cursor: pointer;
        opacity: .9;
        z-index: 6;
    }

        .business-carousel .carousel-hint.left {
            left: 12px;
        }

        .business-carousel .carousel-hint.right {
            right: 12px;
        }

[data-bs-theme="dark"] .business-carousel .carousel-hint {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.16);
}

    /* Under-image control strip: shrink-wrap pill, centered */
    .business-carousel .carousel-controls-strip {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        /* shrink to contents */
        width: fit-content;
        max-width: 100%;
        /* center beneath image */
        margin: 6px auto 0 auto;
        /* neutral readable pill */
        background: rgba(0,0,0,.04);
        border: 1px solid rgba(0,0,0,.14);
        border-radius: 999px;
        padding: .18rem .35rem;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

[data-bs-theme="dark"] .business-carousel .carousel-controls-strip {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.16);
}

/* Play/Pause button: theme-aware */
.business-carousel .carousel-playpause {
    width: 18px;
    height: 18px;
    padding: 0;
    line-height: 1;
	font-size: 10px; /* affects <i> */
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,.16);
    background: rgba(0,0,0,.03);
    color: rgba(0,0,0,.78);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

[data-bs-theme="dark"] .business-carousel .carousel-playpause {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.92);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.business-carousel .carousel-playpause:hover {
    background: rgba(0,0,0,.06);
    border-color: rgba(0,0,0,.24);
}

[data-bs-theme="dark"] .business-carousel .carousel-playpause:hover {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.28);
}

.business-carousel .carousel-playpause:focus-visible {
    outline: 2px solid rgba(var(--bs-primary-rgb), .9);
    outline-offset: 2px;
}

/* Dots */
.business-carousel .carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    overflow: visible;
    padding: 1px 0;
}

.business-carousel .carousel-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,.18);
    background: rgba(0,0,0,.22);
    opacity: .65;
    transition: transform .18s ease, opacity .18s ease, background-color .18s ease, border-color .18s ease;
}

[data-bs-theme="dark"] .business-carousel .carousel-dot {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.28);
    opacity: .75;
}

.business-carousel .carousel-dot.is-active {
    background: rgba(0,0,0,.72);
    border-color: rgba(0,0,0,.30);
    opacity: 1;
    transform: scale(1.35);
}

[data-bs-theme="dark"] .business-carousel .carousel-dot.is-active {
    background: rgba(255,255,255,.85);
    border-color: rgba(255,255,255,.35);
}

.business-carousel .carousel-dot:hover {
    opacity: .9;
    transform: scale(1.2);
}

/* Softer crossfade between images */
.business-carousel.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity .75s ease-in-out;
}

    .business-carousel.carousel-fade .carousel-item.active,
    .business-carousel.carousel-fade .carousel-item-next.carousel-item-start,
    .business-carousel.carousel-fade .carousel-item-prev.carousel-item-end {
        opacity: 1;
    }

    .business-carousel.carousel-fade .carousel-item-next,
    .business-carousel.carousel-fade .carousel-item-prev,
    .business-carousel.carousel-fade .carousel-item.active {
        transform: none !important;
    }

/* ==========================================================================
	4) LAYOUT 1 — GRID
========================================================================== */

.business-detail-layout-1-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .business-detail-layout-1-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .business-detail-layout-1-grid {
        align-items: stretch;
    }

        .business-detail-layout-1-grid.bd1-row-locked {
            align-items: start;
        }

    .bd1-practical {
        border-left: 2px solid var(--fn-offcanvas-color);
        padding-left: 20px;
    }
}

/* ==========================================================================
	5) WHY VISIT — clamp + toggle (JS controls visibility)
	IMPORTANT:
	- CSS does NOT permanently hide the button.
	- JS sets btn.style.display = 'none' when no overflow.
========================================================================== */

.why-visit {
    position: relative;
}

/* Text block */
.why-visit__text {
    margin-bottom: 0;
    max-height: none;
    overflow: visible;
    padding-bottom: 0; /* only reserved when toggle is shown */
}

/* Collapsed = true line clamp */
.why-visit.is-collapsed > .why-visit__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--why-lines, 5);
    overflow: hidden;
}

/* Expanded = normal flow */
.why-visit.is-expanded > .why-visit__text {
    display: block;
    overflow: visible;
}

/* Reserve space so the toggle doesn’t cover the last line (when shown) */
.why-visit.has-toggle > .why-visit__text {
    padding-bottom: 1.8rem;
}

/* Toggle styling (visibility handled by JS inline display) */
.why-visit__toggle {
    position: absolute;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    padding: .08rem .45rem;
    border-radius: 999px;
    font-size: .78rem;
    line-height: 1.2;
    border: 1px solid rgba(0,0,0,.14);
    background: rgba(0,0,0,.03);
    color: var(--bs-link-color);
}

    .why-visit__toggle:hover {
        text-decoration: none;
        border-color: rgba(0,0,0,.22);
        background: rgba(0,0,0,.06);
    }

[data-bs-theme="dark"] .why-visit__toggle {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
}

    [data-bs-theme="dark"] .why-visit__toggle:hover {
        border-color: rgba(255,255,255,.22);
        background: rgba(255,255,255,.10);
    }

/* Why-visit line formatting */
.why-visit__line {
    margin: 0;
}

.why-visit__line--spaced {
    margin-top: .6rem;
}

/* ==========================================================================
	6) PRACTICAL INFO — sections + parking row/pills
========================================================================== */

.pi-section {
    margin-bottom: .35rem;
}

.pi-title {
    margin: 0 0 .35rem 0;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .02em;
    opacity: .85;
}

.pi-body {
    margin-bottom: .35rem;
}

/* Parking app row */
.pi-app-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}

.pi-app-name {
    font-weight: 700;
    white-space: nowrap;
}

/* Small round website icon next to app name */
.pi-app-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    opacity: .75;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.02);
}

    .pi-app-site:hover {
        opacity: 1;
        background: rgba(0,0,0,.05);
        text-decoration: none;
    }

[data-bs-theme="dark"] .pi-app-site {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
}

    [data-bs-theme="dark"] .pi-app-site:hover {
        background: rgba(255,255,255,.08);
    }

/* Pills */
.pi-platform {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.02);
    text-decoration: none;
    font-weight: 600;
    font-size: .9em;
    white-space: nowrap;
}

    .pi-platform:hover {
        text-decoration: none;
        background: rgba(0,0,0,.05);
    }

[data-bs-theme="dark"] .pi-platform {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
}

    [data-bs-theme="dark"] .pi-platform:hover {
        background: rgba(255,255,255,.08);
    }

/* Ensure FA icons inside pills have a box (works for <i> or <svg>) */
.pi-platform > i,
.pi-platform > svg {
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
    flex: 0 0 auto;
}

    .pi-platform > i::before {
        line-height: 1;
    }

/* ==========================================================================
	7) PHOTO EDITOR — drag/drop indicator + picker UI
========================================================================== */

.biz-photo-selected-tile {
    position: relative;
    overflow: visible;
}

    .biz-photo-selected-tile.dragging {
        opacity: .65;
        transform: scale(.98);
    }

    .biz-photo-selected-tile::before,
    .biz-photo-selected-tile::after {
        content: "";
        position: absolute;
        top: 8px;
        bottom: 8px;
        width: 4px;
        border-radius: 2px;
        background: var(--bs-primary);
        opacity: 0;
        pointer-events: none;
        z-index: 9999;
    }

    .biz-photo-selected-tile::before {
        left: 8px;
    }

    .biz-photo-selected-tile::after {
        right: 8px;
    }

    .biz-photo-selected-tile.drop-before::before {
        opacity: .95;
    }

    .biz-photo-selected-tile.drop-after::after {
        opacity: .95;
    }

/* Active photo (being edited) */
#bizPhotoPickerGrid .biz-photo-grid-tile.is-active-photo .card {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 .15rem rgba(var(--bs-primary-rgb), .20);
}

/* Already in carousel */
#bizPhotoPickerGrid .biz-photo-grid-tile.is-in-carousel .card {
    opacity: .92;
}

#bizPhotoPickerGrid .biz-photo-grid-tile.is-in-carousel .js-add-to-carousel {
    opacity: .55;
    cursor: not-allowed;
}

/* Strip */
#bizPhotoSelectedStrip {
    margin-bottom: 25px;
}

    #bizPhotoSelectedStrip .biz-photo-selected-tile {
        cursor: pointer;
    }

        #bizPhotoSelectedStrip .biz-photo-selected-tile.is-active-photo {
            outline: 2px solid var(--bs-primary);
            outline-offset: 2px;
            box-shadow: 0 0 0 .15rem rgba(var(--bs-primary-rgb), .20);
        }

        #bizPhotoSelectedStrip .biz-photo-selected-tile .btn-close {
            position: absolute;
            top: 6px;
            right: 6px;
            z-index: 5;
            background-color: rgba(255,255,255,.85);
            border-radius: 999px;
            padding: 6px;
        }

[data-bs-theme="dark"] #bizPhotoSelectedStrip .biz-photo-selected-tile .btn-close {
    background-color: rgba(0,0,0,.55);
}

/* Credit preview safety */
#bizPhotoCreditPreview,
.photo-credit {
    white-space: normal;
    word-break: break-word;
}

    #bizPhotoCreditPreview a,
    .photo-credit a {
        text-decoration: underline;
    }

/* Picker grid stacking safety */
#bizPhotoPickerGrid {
    position: relative;
    isolation: isolate;
}

    #bizPhotoPickerGrid .biz-photo-grid-tile {
        cursor: pointer;
    }

        #bizPhotoPickerGrid .biz-photo-grid-tile .card {
            overflow: hidden;
            transform: translateZ(0);
        }

.biz-drop-indicator {
    pointer-events: none;
    position: fixed;
    z-index: 9999;
}

/* “+” chip */
#bizPhotoPickerGrid .js-add-to-carousel {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 6;
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background-color: rgba(255,255,255,.6);
    transition: background-color .12s ease, outline-color .12s ease;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
}

[data-bs-theme="dark"] #bizPhotoPickerGrid .js-add-to-carousel {
    background-color: rgba(0,0,0,.6);
}

#bizPhotoPickerGrid .js-add-to-carousel:hover {
    background-color: rgba(255,255,255,.9);
}

[data-bs-theme="dark"] #bizPhotoPickerGrid .js-add-to-carousel:hover {
    background-color: rgba(0,0,0,.9);
}

#bizPhotoPickerGrid .js-add-to-carousel:focus-visible {
    outline: 2px solid rgba(var(--bs-primary-rgb), .9);
    outline-offset: 2px;
}

#bizPhotoPickerGrid .js-add-to-carousel:disabled,
#bizPhotoPickerGrid .biz-photo-grid-tile.is-in-carousel .js-add-to-carousel {
    opacity: .6;
    cursor: not-allowed;
}

/* ==========================================================================
	8) NEUTRAL MEDIA WRAPPER (non-carousel legacy safety)
========================================================================== */

.detail-media {
    background: transparent;
    overflow: visible;
    border-radius: 0;
}

[data-bs-theme="light"] .detail-media {
    border-color: rgba(0,0,0,.10);
}

[data-bs-theme="dark"] .detail-media {
    border-color: rgba(255,255,255,.12);
}

.detail-media > img {
    display: block;
    width: 100%;
    height: auto;
}

/* -----------------------------------------------------------------
	WHY VISIT — give the toggle its own lane (no overlap)
------------------------------------------------------------------ */

/* Stop reserving space via text padding (it only moves text) */
.why-visit.has-toggle > .why-visit__text {
    padding-bottom: 0 !important;
}

/* No special padding lane needed */
.why-visit.has-toggle {
	padding-bottom: 0;
}

/* Park the button in that lane */
.why-visit__toggle {
    bottom: -1.75rem; /* moves it UP inside the lane; increase to move it up more */
    right: 0;
}

/* Partner section shell */
.biz-partner-section {
    border-top: 1px solid rgba(0,0,0,.08);
    padding-top: 12px;
}

/* Tiny badge placeholder (swap for a real icon later) */
.partner-badge {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    background: rgba(0,0,0,.06);
    color: rgba(0,0,0,.75);
}

html[data-theme="dark"] .biz-partner-section {
    border-top-color: rgba(255,255,255,.12);
}

html[data-theme="dark"] .partner-badge {
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.82);
}

/* if bd1 grid is display:grid with 2 columns */
.business-detail-layout-1-grid .bd1-full {
    grid-column: 1 / -1;
}

.partner-offers-group + .partner-offers-group {
    margin-top: 1rem;
}

.partner-offers-heading {
    margin-bottom: .5rem;
    font-size: .95rem;
    font-weight: 600;
}

.partner-offer {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(0,0,0,.08);
}

.partner-offer__media {
    width: 100%;
}

.partner-offer__image {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(0,0,0,.04);
}

.partner-offer__body .title {
    font-weight: 500;
    margin-bottom: 8px;
}

.partner-offer__body .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(0,0,0,.72);
    font-size: .95rem;
}

@media (max-width: 768px) {
    .partner-offer {
        grid-template-columns: 1fr;
    }

    .partner-offer__image {
        height: 180px;
    }
}

.viator-block + .viator-block {
    margin-top: 1rem;
}

.viator-block__heading {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.viator-block__subheading {
    margin-bottom: 0.75rem;
}

.partner-offer + .partner-offer {
    margin-top: 0.75rem;
}