/* vendidit-site.css — site-wide tweaks loaded on every page.
 *
 * Kept scoped to the shared header's wrapper so these rules never leak into
 * anything else. Add new site-wide overrides here; inject-site-css.py keeps
 * the <link> tag in every page. */

/* ---------------------------------------------------------------------------
 * Stacking: the top bar (View Auctions / Seller Login / Help Center) sits
 * above the logo row in the DOM and has a white background. When the logo
 * column moves up with a negative margin it would otherwise get clipped by
 * that white background. Force the top bar to the back and the bottom row
 * to the front. position:relative is required for z-index to take effect.
 * This applies on all viewports since it's only a paint-order fix.
 * ------------------------------------------------------------------------- */
#hs_cos_wrapper_site_header-module-2 .header__top.header__top-menu {
    position: relative;
    z-index: 0;
}

#hs_cos_wrapper_site_header-module-2 .header__bottom {
    position: relative;
    z-index: 1;
}

/* ---------------------------------------------------------------------------
 * Tout / card content alignment
 *
 * HubSpot flag-cells on the home page (What We Help You Achieve, Who We
 * Work With, Why Vendidit Exists, Resources) all render as
 * `display: flex; flex-direction: column; justify-content: center`. Because
 * they share a fixed height inside their row but have variable-length
 * content, cards with shorter headings end up visually "sunk" — the pill,
 * heading, paragraph and CTA bob around the card's vertical centre instead
 * of starting from the top.
 *
 * Top-align all such cards and bump their top/bottom padding to 1.5rem so
 * content has a consistent breathing room. Narrowed to non-`span12` cells
 * so full-width section wrappers (which share the same background+padding
 * class shape but act as heroes, not touts) aren't affected.
 * ------------------------------------------------------------------------- */
.widget-type-cell[class*="-background-color"][class*="-padding"]:not(.span12),
.widget-type-cell[class*="-background-layers"][class*="-padding"]:not(.span12) {
    justify-content: flex-start !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* ---------------------------------------------------------------------------
 * Desktop-only header adjustments (≥992px).
 *
 * Mobile uses a collapsed hamburger layout where these negative margins would
 * wreck the alignment, so everything below is behind a min-width guard.
 * ------------------------------------------------------------------------- */
@media (min-width: 992px) {
    #hs_cos_wrapper_site_header-module-2 .header__bottom.header_styles {
        padding-bottom: 5px;
    }

    #hs_cos_wrapper_site_header-module-2 .header__bottom .container-xl {
        padding-right: 15px;
    }

    /* Pull the logo column up so it optically centres against the nav text */
    #hs_cos_wrapper_site_header-module-2 .header__logo-col {
        position: relative;
        margin-top: -25px;
    }

    /* Thin vertical divider between the logo and the nav — this used to be
     * baked into the `vendidit-logo-svg-with-divider-1.svg` image, but we
     * switched to the plain `vendidit-logo-large.svg` when consolidating to
     * a single <img>. Re-create it as a pseudo-element so the markup stays
     * simple. Desktop only — mobile hides the nav entirely. */
    #hs_cos_wrapper_site_header-module-2 .header__logo-col::after {
        content: "";
        position: absolute;
        top: 55%;
        right: -25px;
        transform: translateY(-50%);
        width: 1px;
        height: 50px;
        background-color: #e6edef;
    }
}

/* ---------------------------------------------------------------------------
 * Mobile (<992px).
 *
 * The STARDUST nav CSS hides any .header__logo-image that isn't marked with
 * the .logo_mobile class (see the `[data-layout=mobile] [data-mobile=true]
 * .header__logo-image:not(.logo_mobile)` rule in module_STARDUST_Navigation_01
 * .min.css). Our consolidated markup uses a single <img> without that class,
 * so force it visible here and size it down so it fits next to the hamburger.
 * ------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    #hs_cos_wrapper_site_header-module-2 .header__logo-image {
        display: inline-block !important;
        max-height: 40px;
        width: auto;
        height: auto;
    }

    /* The logo lives in .header__logo-col inside .header__wrapper--bottom.
     * Keep it top-left with a small gutter and make the wrapper the
     * positioning context for the absolutely-placed toggle buttons below. */
    #hs_cos_wrapper_site_header-module-2 .header__wrapper--bottom {
        position: relative;
        align-items: center;
        padding: 10px 12px;
    }

    #hs_cos_wrapper_site_header-module-2 .header__logo-col {
        flex: 0 0 auto;
        margin-right: auto;
    }

    /* Keep the mobile menu-container in normal flow and transform-free.
     * IMPORTANT: any transform on this element would make it the containing
     * block for the `position: fixed` slide-out nav inside it, which would
     * cause the nav panel to be clipped to the container's width instead of
     * filling the viewport (we hit that bug previously). */
    #hs_cos_wrapper_site_header-module-2 .header__menu-container--mobile {
        display: block !important;
        position: static;
    }

    /* Pin both toggle buttons (open hamburger + close ×) to the top-right of
     * the bottom row. They share the same position so they overlap — only
     * one is `--show` at a time. Transform stays HERE, not on the parent. */
    #hs_cos_wrapper_site_header-module-2 .header__menu-toggle {
        position: absolute;
        top: 50%;
        right: 12px;
        margin: 0;
        transform: translateY(-50%);
        z-index: 10;
    }

    #hs_cos_wrapper_site_header-module-2 .header__menu-toggle--show {
        display: block !important;
    }

    /* Full-viewport-width slide-out panel below the fixed header.
     * STARDUST already sets position:fixed; width:100%; left:0; right:0 —
     * re-assert these with !important so nothing else (e.g. inherited
     * right offsets from the old container-absolute layout) clips it. */
    #hs_cos_wrapper_site_header-module-2 .header__menu--mobile {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
}
