/* Business page personalisation: owner-chosen banner, heading font, card style,
   plus the tagline, hero badges, socials, featured highlight, gallery, team and FAQ.
   Loaded on every business page (includes/business-site.php). Selectors start with
   body.biz-detail-compact so they win over the pages' own inline styles. */

/* ===== Banner styles ===== */
.business-header-image .biz-banner-art {
    position: absolute;
    inset: 0;
}
.biz-banner-art--gradient {
    background: linear-gradient(120deg, var(--biz-primary, #2563eb) 0%, var(--biz-accent, #0ea5e9) 100%);
}
.biz-banner-art--pattern {
    background-color: var(--biz-primary, #2563eb);
    background-image:
        radial-gradient(rgba(255, 255, 255, .22) 1.6px, transparent 1.8px),
        linear-gradient(135deg, var(--biz-primary, #2563eb) 0%, color-mix(in srgb, var(--biz-primary, #2563eb) 70%, #000) 100%);
    background-size: 18px 18px, cover;
}

/* ===== Heading font ===== */
body.biz-detail-compact:not(.biz-font-default) .business-info-header h1,
body.biz-detail-compact:not(.biz-font-default) .company-tabs-brand-name,
body.biz-detail-compact:not(.biz-font-default) .biz-portal-card h3,
body.biz-detail-compact:not(.biz-font-default) .reviews-section h2,
body.biz-detail-compact:not(.biz-font-default) .business-section h2,
body.biz-detail-compact:not(.biz-font-default) .business-section h3,
body.biz-detail-compact:not(.biz-font-default) .biz-team-card strong {
    font-family: var(--biz-heading-font, inherit);
    letter-spacing: 0;
}

/* ===== Tagline ===== */
.business-tagline {
    margin: -2px 0 8px;
    font-size: .92rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.35;
}

/* ===== Hero strip ===== */
body.biz-detail-compact .biz-portal-hero {
    border-left: 4px solid var(--biz-primary, #2563eb);
    background: linear-gradient(90deg, color-mix(in srgb, var(--biz-primary, #2563eb) 7%, #fff) 0%, #fff 70%);
}
.biz-portal-hero-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1 1 320px;
}
.biz-portal-hero-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.biz-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.biz-open-badge,
.biz-since-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.3;
}
.biz-open-badge i { font-size: .45rem; }
.biz-open-badge.is-open { background: #dcfce7; color: #166534; }
.biz-open-badge.is-closed { background: #fee2e2; color: #991b1b; }
.biz-open-badge--sm { padding: 2px 8px; font-size: .64rem; margin-left: 6px; vertical-align: middle; }
.biz-since-badge {
    background: color-mix(in srgb, var(--biz-primary, #2563eb) 10%, #fff);
    color: color-mix(in srgb, var(--biz-primary, #2563eb) 75%, #000);
}
.biz-since-badge i { font-size: .65rem; }

.biz-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.biz-highlights li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid color-mix(in srgb, var(--biz-primary, #2563eb) 25%, #fff);
    background: #fff;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    color: #1e293b;
}
.biz-highlights li i { color: var(--biz-primary, #2563eb); font-size: .62rem; }

/* ===== Social links ===== */
.biz-social-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.biz-portal-hero-right .biz-social-row {
    padding-right: 12px;
    border-right: 1px solid #e2e8f0;
}
.biz-social-row--center { justify-content: center; }
.biz-social-link {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    font-size: .85rem;
    transition: background .15s, color .15s, transform .15s;
}
.biz-social-link:hover { color: #fff; transform: translateY(-1px); }
.biz-social-link--instagram:hover { background: #e1306c; }
.biz-social-link--facebook:hover { background: #1877f2; }
.biz-social-link--tiktok:hover { background: #000; }
.biz-social-link--x:hover { background: #0f1419; }
.biz-social-link--linkedin:hover { background: #0a66c2; }
.biz-social-link--youtube:hover { background: #ff0000; }
.biz-follow-label {
    margin: 12px 0 6px;
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    text-align: center;
    font-weight: 700;
}

/* ===== Theme colour across the page ===== */
body.biz-detail-compact .biz-trust-item { border-top: 2px solid var(--biz-primary, #2563eb); }
body.biz-detail-compact .biz-trust-item strong { color: var(--biz-primary, #0f172a); }
body.biz-detail-compact .biz-update-item,
body.biz-detail-compact .biz-job-item,
body.biz-detail-compact .biz-product-mini { transition: border-color .15s, background .15s; }
body.biz-detail-compact .biz-update-item:hover,
body.biz-detail-compact .biz-job-item:hover,
body.biz-detail-compact .biz-product-mini:hover {
    border-color: color-mix(in srgb, var(--biz-primary, #2563eb) 40%, #fff);
    background: color-mix(in srgb, var(--biz-primary, #2563eb) 4%, #fff);
}
body.biz-detail-compact .biz-product-mini strong { color: var(--biz-primary, #0f172a); }
body.biz-detail-compact .reviews-section h2 i { color: var(--biz-primary, #2563eb); }
.biz-count {
    margin-left: auto;
    font-size: .68rem;
    font-weight: 600;
    color: #94a3b8;
}
.biz-hours-title {
    margin: 0 0 8px;
    font-size: 13px;
    color: #0f172a;
}

/* ===== Featured highlight ===== */
body.biz-detail-compact .biz-portal-card.biz-feature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: color-mix(in srgb, var(--biz-primary, #2563eb) 7%, #fff);
    border: 1px solid color-mix(in srgb, var(--biz-primary, #2563eb) 25%, #fff);
    border-left: 4px solid var(--biz-primary, #2563eb);
}
.biz-feature__body { min-width: 0; flex: 1 1 260px; }
.biz-feature__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--biz-primary, #2563eb);
}
body.biz-detail-compact .biz-feature h3 { margin: 4px 0 4px; font-size: 1.02rem; }
.biz-feature p { margin: 0; font-size: .8rem; color: #475569; line-height: 1.45; }
.biz-feature__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: var(--biz-primary, #2563eb);
    color: #fff !important;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.biz-feature__btn:hover { filter: brightness(.92); }

/* ===== Pinned review ===== */
.biz-spotlight blockquote {
    margin: 0;
    padding: 12px 14px;
    border-left: 3px solid var(--biz-primary, #2563eb);
    background: color-mix(in srgb, var(--biz-primary, #2563eb) 4%, #fff);
}
.biz-spotlight__stars { color: #f59e0b; font-size: .72rem; display: flex; gap: 2px; margin-bottom: 6px; }
.biz-spotlight__title { display: block; font-size: .85rem; color: #0f172a; margin-bottom: 4px; }
.biz-spotlight blockquote p { margin: 0 0 8px; font-size: .84rem; color: #334155; line-height: 1.55; }
.biz-spotlight blockquote footer { font-size: .7rem; color: #64748b; font-weight: 600; }
.biz-spotlight__more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--biz-primary, #2563eb);
    text-decoration: none;
}

/* ===== Gallery ===== */
.biz-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.biz-gallery-item {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: #f1f5f9;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: zoom-in;
}
.biz-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s;
}
.biz-gallery-item:hover img { transform: scale(1.04); }
.biz-gallery-item:focus-visible { outline: 3px solid var(--biz-primary, #2563eb); outline-offset: 2px; }
.biz-gallery-item.is-extra { display: none; }
/* Five photos or more: the first one is shown large. */
.biz-gallery-grid:has(> .biz-gallery-item:nth-child(5)) > .biz-gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}
/* Keep the large photo from stretching its rows: the small tiles set the height. */
.biz-gallery-grid:has(> .biz-gallery-item:nth-child(5)) > .biz-gallery-item:first-child img {
    position: absolute;
    inset: 0;
}
.biz-gallery-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .55);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
}

.biz-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(2, 6, 23, .92);
}
.biz-lightbox[hidden],
.biz-lightbox [hidden] { display: none !important; }
.biz-lightbox figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.biz-lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; display: block; margin: 0 auto; }
.biz-lightbox figcaption { margin-top: 10px; color: #e2e8f0; font-size: .85rem; white-space: pre-wrap; }
body .biz-lightbox button.biz-lightbox__nav,
body .biz-lightbox button.biz-lightbox__close {
    border: 0;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body .biz-lightbox button.biz-lightbox__nav { width: 48px; height: 48px; font-size: 1rem; }
body .biz-lightbox button.biz-lightbox__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; }
body .biz-lightbox button:hover { background: rgba(255, 255, 255, .24); }

/* ===== Team ===== */
.biz-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.biz-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 10px;
    border: 1px solid #f1f5f9;
    text-align: center;
}
.biz-team-card__photo {
    width: 72px;
    height: 72px;
    border-radius: 50% !important;
    object-fit: cover;
    margin-bottom: 6px;
    border: 3px solid color-mix(in srgb, var(--biz-primary, #2563eb) 20%, #fff);
}
.biz-team-card__initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--biz-primary, #2563eb) 12%, #fff);
    color: var(--biz-primary, #2563eb);
    font-size: 1.6rem;
    font-weight: 700;
}
.biz-team-card strong { font-size: .84rem; color: #0f172a; }
.biz-team-card__role { font-size: .68rem; font-weight: 600; color: var(--biz-primary, #2563eb); }
.biz-team-card q { margin-top: 6px; font-size: .72rem; color: #64748b; font-style: italic; line-height: 1.45; }

/* ===== FAQ ===== */
.biz-faq { display: flex; flex-direction: column; }
.biz-faq__item { border-bottom: 1px solid #f1f5f9; }
.biz-faq__item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: .82rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
}
.biz-faq__item summary::-webkit-details-marker { display: none; }
.biz-faq__item summary::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--biz-primary, #2563eb);
    flex-shrink: 0;
}
.biz-faq__item[open] summary { color: var(--biz-primary, #2563eb); }
.biz-faq__item[open] summary::after { content: '\2212'; }
.biz-faq__item .biz-richtext { padding: 0 0 12px; font-size: .8rem; color: #475569; }
.biz-faq__item .biz-richtext p { margin: 0 0 6px; }

/* ===== Card style: rounded and floating ===== */
body.biz-detail-compact.biz-card-rounded .biz-portal-card,
body.biz-detail-compact.biz-card-rounded .biz-portal-hero,
body.biz-detail-compact.biz-card-rounded .business-section,
body.biz-detail-compact.biz-card-rounded .business-header,
body.biz-detail-compact.biz-card-rounded .company-tabs,
body.biz-detail-compact.biz-card-soft .biz-portal-card,
body.biz-detail-compact.biz-card-soft .biz-portal-hero,
body.biz-detail-compact.biz-card-soft .business-section,
body.biz-detail-compact.biz-card-soft .business-header,
body.biz-detail-compact.biz-card-soft .company-tabs {
    border-radius: 14px !important;
}
body.biz-detail-compact.biz-card-rounded .business-header-image,
body.biz-detail-compact.biz-card-soft .business-header-image {
    border-radius: 14px 14px 0 0 !important;
    overflow: hidden;
}
body.biz-detail-compact.biz-card-rounded .business-header-image img,
body.biz-detail-compact.biz-card-soft .business-header-image img { border-radius: 0 !important; }
body.biz-detail-compact.biz-card-rounded :is(.biz-trust-item, .biz-update-item, .biz-job-item, .biz-product-mini, .biz-product-mini img, .biz-gallery-item, .biz-map-box, .biz-share-box, .biz-share-qr img, .biz-link-pill, .biz-team-card, .biz-feature__btn, .biz-contact-review-btn, .biz-spotlight blockquote, .btn-vote, .company-job, .biz-product-card),
body.biz-detail-compact.biz-card-soft :is(.biz-trust-item, .biz-update-item, .biz-job-item, .biz-product-mini, .biz-product-mini img, .biz-gallery-item, .biz-map-box, .biz-share-box, .biz-share-qr img, .biz-link-pill, .biz-team-card, .biz-feature__btn, .biz-contact-review-btn, .biz-spotlight blockquote, .btn-vote, .company-job, .biz-product-card) {
    border-radius: 9px !important;
}
body.biz-detail-compact.biz-card-rounded button:is(.biz-quick-request-btn, .biz-share-btn),
body.biz-detail-compact.biz-card-soft button:is(.biz-quick-request-btn, .biz-share-btn) {
    border-radius: 9px !important;
}
body.biz-detail-compact.biz-card-soft :is(.biz-portal-card, .biz-portal-hero, .business-section, .business-header, .company-tabs) {
    border-color: transparent !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .07) !important;
}
body.biz-detail-compact.biz-card-soft .biz-portal-hero { border-left: 4px solid var(--biz-primary, #2563eb) !important; }
body.biz-detail-compact.biz-card-soft .biz-portal-card.biz-feature { border-color: color-mix(in srgb, var(--biz-primary, #2563eb) 25%, #fff) !important; border-left-color: var(--biz-primary, #2563eb) !important; }
body.biz-detail-compact.biz-card-soft :is(.biz-trust-item, .biz-update-item, .biz-job-item, .biz-product-mini, .biz-team-card) {
    background: #f8fafc;
    border-color: transparent;
}

/* ===== Small screens ===== */
@media (max-width: 768px) {
    /* The hero stacks on phones; a flex-basis there would become a fixed height. */
    .biz-portal-hero-left { flex: 0 0 auto; width: 100%; }
    .biz-portal-hero-right { width: 100%; justify-content: space-between; }
    .biz-portal-hero-right .biz-social-row { border-right: 0; padding-right: 0; }
    .biz-team-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .biz-lightbox { flex-wrap: wrap; align-content: center; }
    .biz-lightbox figure { order: -1; width: 100%; }
}
@media (max-width: 480px) {
    .business-tagline { font-size: .82rem; }
    .biz-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .biz-gallery-grid:has(> .biz-gallery-item:nth-child(5)) > .biz-gallery-item:first-child { grid-row: span 1; aspect-ratio: 16 / 9; }
    .biz-feature__btn { width: 100%; justify-content: center; }
}

/* ===== @handle under the business name ===== */
.business-handle-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: -2px 0 8px;
}

.business-handle-line .business-handle {
    font-size: .95rem;
    font-weight: 600;
    color: #475569;
    word-break: break-all;
}

.business-handle-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px !important;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.business-handle-copy:hover {
    border-color: var(--biz-primary, #021A54);
    color: var(--biz-primary, #021A54);
}

/* Trust row holds 4-6 boxes (track record from quotes is optional). */
body.biz-detail-compact .biz-trust-row { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
