/* ============================================================
   GWW PROFILE TIER POLISH V1.23.3.28
   Badge-free tiers + Advanced hero repair
   ============================================================ */

/* ------------------------------------------------------------
   REMOVE AUTHORITY / VERIFIED BADGE PRESENTATION FROM ALL TIERS
   Do not hide .gww-authority-grid: that is a real content layout.
   ------------------------------------------------------------ */

.gww-profile-tier [data-gww-authority-badge],
.gww-profile-tier [data-gww-verified-badge],
.gww-profile-tier [class*="authority-badge"],
.gww-profile-tier [class*="verified-badge"],
.gww-profile-tier [class*="directory-verified"],
.gww-profile-tier .gww-business-verified {
    display:none !important;
}

/* If an older badge implementation used one of these pseudo-elements,
   ensure it does not leave text behind. */
.gww-profile-tier [data-gww-authority-badge]::before,
.gww-profile-tier [data-gww-authority-badge]::after,
.gww-profile-tier [data-gww-verified-badge]::before,
.gww-profile-tier [data-gww-verified-badge]::after,
.gww-profile-tier [class*="authority-badge"]::before,
.gww-profile-tier [class*="authority-badge"]::after,
.gww-profile-tier [class*="verified-badge"]::before,
.gww-profile-tier [class*="verified-badge"]::after {
    content:none !important;
    display:none !important;
}

/* ------------------------------------------------------------
   ADVANCED PROFESSIONAL HERO
   Preserve canonical image width/height/crop/position controls.
   ------------------------------------------------------------ */

@supports selector(body:has(#gww-advanced-profile-root)) {

    body:has(#gww-advanced-profile-root)
    #gww-advanced-profile-root .gww-hero-inner {
        align-items:center !important;
        column-gap:38px !important;
        row-gap:18px !important;
    }

    body:has(#gww-advanced-profile-root)
    #gww-advanced-profile-root .gww-hero-copy {
        min-width:min(520px,100%) !important;
        width:min(100%,720px) !important;
        max-width:720px !important;
        justify-self:start !important;
        align-self:center !important;
    }

    body:has(#gww-advanced-profile-root)
    #gww-advanced-profile-root .gww-hero-copy h1 {
        display:block !important;
        width:auto !important;
        max-width:100% !important;
        min-width:0 !important;
        white-space:normal !important;
        word-break:normal !important;
        overflow-wrap:normal !important;
        hyphens:none !important;
        line-height:1.02 !important;
        margin:0 0 10px !important;
    }

    body:has(#gww-advanced-profile-root)
    #gww-advanced-profile-root
    :is(.gww-specialty,.gww-location,.gww-share) {
        max-width:100% !important;
        white-space:normal !important;
        word-break:normal !important;
        overflow-wrap:normal !important;
    }

    /* Make the second hero column useful rather than the old narrow
       authority-badge column. This leaves the canonical image column
       and flexible trailing space intact. */
    body:has(#gww-advanced-profile-root)
    #gww-advanced-profile-root .gww-hero-inner {
        grid-template-columns:
            max-content
            minmax(360px,720px)
            minmax(0,1fr)
            !important;
    }

    /* --------------------------------------------------------
       ADVANCED BUSINESS HERO
       -------------------------------------------------------- */

    body:has(#gww-advanced-business-root)
    #gww-advanced-business-root .gww-business-hero-grid {
        align-items:center !important;
        column-gap:38px !important;
        row-gap:18px !important;
        grid-template-columns:
            max-content
            minmax(360px,720px)
            minmax(0,1fr)
            !important;
    }

    body:has(#gww-advanced-business-root)
    #gww-advanced-business-root .gww-business-hero-copy {
        min-width:min(520px,100%) !important;
        width:min(100%,720px) !important;
        max-width:720px !important;
        justify-self:start !important;
        align-self:center !important;
    }

    body:has(#gww-advanced-business-root)
    #gww-advanced-business-root .gww-business-hero-copy h1 {
        display:block !important;
        width:auto !important;
        max-width:100% !important;
        min-width:0 !important;
        white-space:normal !important;
        word-break:normal !important;
        overflow-wrap:normal !important;
        hyphens:none !important;
        line-height:1.02 !important;
        margin:0 0 10px !important;
    }

    body:has(#gww-advanced-business-root)
    #gww-advanced-business-root
    :is(
        .gww-business-hero-category,
        .gww-business-hero-location,
        .gww-business-hero-actions
    ) {
        max-width:100% !important;
        white-space:normal !important;
        word-break:normal !important;
        overflow-wrap:normal !important;
    }
}

@media(max-width:820px) {
    @supports selector(body:has(#gww-advanced-profile-root)) {
        body:has(#gww-advanced-profile-root)
        #gww-advanced-profile-root .gww-hero-inner,
        body:has(#gww-advanced-business-root)
        #gww-advanced-business-root .gww-business-hero-grid {
            grid-template-columns:1fr !important;
        }

        body:has(#gww-advanced-profile-root)
        #gww-advanced-profile-root .gww-hero-copy,
        body:has(#gww-advanced-business-root)
        #gww-advanced-business-root .gww-business-hero-copy {
            min-width:0 !important;
            width:100% !important;
            max-width:100% !important;
        }
    }
}
