/* ============================================================
   GWW ADVANCED FINAL POLISH V1.23.3.38.1
   Professional + Business Advanced only
   ============================================================ */

@supports selector(body:has(.gww-profile-tier.gww-tier-advanced)) {

    /* ---------- readable body copy ---------- */

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww-editorial-section,
        .gww-business-card,
        .gww-business-section-card,
        .gww-business-media-card,
        .gww-sidebar-card,
        .gww-business-contact-card
    )
    :is(p,li,address,.gww-business-about-copy) {
        color:#d7e2ec !important;
        opacity:1 !important;
    }

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww-editorial-section,
        .gww-business-card,
        .gww-business-section-card
    )
    :is(
        .gww-location-text,
        .gww-business-location-text,
        .gww-business-address,
        [class*="address"]
    ) {
        color:#c9d7e3 !important;
        opacity:1 !important;
    }

    /* ---------- sidebar values ---------- */

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww-sidebar-card,
        .gww-business-contact-card
    )
    :is(a,span,p,address) {
        opacity:1 !important;
    }

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww-sidebar-card,
        .gww-business-contact-card
    )
    a:not(.gww336-cta) {
        color:#8fc6ff !important;
    }

    /* ---------- advanced primary buttons ---------- */

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww336-primary,
        .gww338-press-cta,
        .gww-adv231-business-press-readmore
    ) {
        color:#06131f !important;
        background:#e4b84f !important;
        border:2px solid #efcc77 !important;
        font-weight:900 !important;
        text-shadow:none !important;
        opacity:1 !important;
        min-height:42px !important;
        box-shadow:
            0 8px 18px rgba(0,0,0,.25),
            inset 0 1px 0 rgba(255,255,255,.26)
            !important;
    }

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww336-primary,
        .gww338-press-cta,
        .gww-adv231-business-press-readmore
    ):hover {
        color:#06131f !important;
        background:#f1ca6b !important;
        border-color:#ffe099 !important;
    }

    /* ---------- Advanced secondary buttons ---------- */

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww336-secondary,
        .gww336-map-cta
    ) {
        color:#f6dfa9 !important;
        background:#0b2034 !important;
        border:2px solid #d8ab4e !important;
        font-weight:850 !important;
        opacity:1 !important;
        min-height:42px !important;
        box-shadow:0 6px 14px rgba(0,0,0,.18) !important;
    }

    body:has(.gww-profile-tier.gww-tier-advanced)
    :is(
        .gww336-secondary,
        .gww336-map-cta
    ):hover {
        color:#071521 !important;
        background:#e4b84f !important;
        border-color:#e4b84f !important;
    }

    /* ---------- press CTA ---------- */

    body:has(.gww-profile-tier.gww-tier-advanced)
    .gww-adv212-press
    :is(
        .gww338-press-cta,
        .gww336-press-cta,
        .gww-adv231-business-press-readmore
    ) {
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        width:auto !important;
        min-width:200px !important;
        max-width:max-content !important;
        padding:10px 15px !important;
        margin-top:10px !important;
        white-space:nowrap !important;
    }

    /* ---------- video CTA when real link exists ---------- */

    body:has(.gww-profile-tier.gww-tier-advanced)
    .gww338-video-cta {
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        min-height:42px !important;
        padding:10px 16px !important;
        color:#f6dfa9 !important;
        background:#0b2034 !important;
        border:2px solid #d8ab4e !important;
        border-radius:6px !important;
        font-weight:850 !important;
        text-decoration:none !important;
    }
}

/* ============================================================
   MOBILE ADVANCED
   ============================================================ */

@media(max-width:720px) {

    @supports selector(body:has(.gww-profile-tier.gww-tier-advanced)) {

        body:has(.gww-profile-tier.gww-tier-advanced)
        :is(
            .gww-editorial-section,
            .gww-business-card,
            .gww-business-section-card,
            .gww-business-media-card
        ) {
            font-size:13px !important;
            line-height:1.55 !important;
        }

        body:has(.gww-profile-tier.gww-tier-advanced)
        :is(
            .gww-editorial-section,
            .gww-business-card,
            .gww-business-section-card,
            .gww-business-media-card
        )
        :is(h2,h3) {
            font-size:16px !important;
            line-height:1.25 !important;
        }

        body:has(.gww-profile-tier.gww-tier-advanced)
        .gww336-cta,
        body:has(.gww-profile-tier.gww-tier-advanced)
        .gww338-video-cta,
        body:has(.gww-profile-tier.gww-tier-advanced)
        .gww338-press-cta {
            min-height:44px !important;
        }

        body:has(.gww-profile-tier.gww-tier-advanced)
        .gww-adv212-press
        :is(
            .gww338-press-cta,
            .gww336-press-cta,
            .gww-adv231-business-press-readmore
        ) {
            width:100% !important;
            max-width:100% !important;
            min-width:0 !important;
        }

        /* Business photo gallery becomes usable at phone width. */
        body:has(#gww-advanced-business-root)
        :is(
            .gww-business-photo-gallery,
            .gww-gallery-grid,
            .gww-business-gallery-grid
        ) {
            display:grid !important;
            grid-template-columns:repeat(2,minmax(0,1fr)) !important;
            gap:8px !important;
        }

        body:has(#gww-advanced-business-root)
        :is(
            .gww-business-gallery-thumb,
            .gww-gallery-item
        ) {
            width:100% !important;
            min-width:0 !important;
        }

        body:has(#gww-advanced-business-root)
        :is(
            .gww-business-gallery-thumb,
            .gww-gallery-item
        ) img {
            display:block !important;
            width:100% !important;
            height:auto !important;
            aspect-ratio:4 / 3 !important;
            object-fit:cover !important;
        }

        /* Prevent hero CTA crowding on narrow screens. */
        body:has(.gww-profile-tier.gww-tier-advanced)
        :is(
            .gww-hero-actions,
            .gww-business-hero-actions
        ) {
            display:flex !important;
            flex-wrap:wrap !important;
            gap:8px !important;
        }
    }
}
