/*
 * Printo_HeaderUi - header presentation fixes.
 *
 *  1. Currency / language dropdown was opening behind the search bar.
 *  2. Cart button outline: square -> pill, matching the search field.
 *  3. Cart button hidden entirely while the cart is empty.
 *
 * Nothing here touches the search field's own rules or any cart behaviour.
 */

/* ------------------------------------------------------------------ 1 --
 * .header-search.desktop is position:relative with z-index:1100, so it
 * opens a stacking context. The switcher dropdown asked for z-index:999
 * but sat inside a z-index:auto parent, so it was resolved against the
 * root context and painted underneath the search bar. Lifting the
 * switcher itself above 1100 fixes it without altering the search bar.
 */
.header-switchers .header-button {
    position: relative;
    z-index: 1200;
}

.header-switchers .header-button ul {
    z-index: 1201;
}

/* ------------------------------------------------------------------ 2 --
 * The 1px #e4e4e4 outline lives on .header-minicart itself. A full pill
 * radius matches the rounded search field beside it.
 */
.header-minicart {
    border-radius: 999px;
}

/* Keep the open dropdown square-cornered; only the button is a pill. */
.header-minicart .skip-content {
    border-radius: 0;
}

/* ------------------------------------------------------------------ 3 --
 * Both minicart templates already stamp `no-count` on the link when the
 * quantity is zero, so the empty state is readable straight from markup.
 * :has() covers current browsers with no flash; headerui.v1.js mirrors it
 * onto .is-empty for anything older.
 */
.header-minicart:has(> a.skip-cart.no-count),
.header-minicart.is-empty {
    display: none !important;
}

/* ------------------------------------------------------------------ 4 --
 * Utility bar (top links + currency): one type size and weight, line icons,
 * hairline dividers and an underline that draws in on hover. Text only, no
 * icons. The theme hides .header-switchers below 992px, so this is
 * desktop-only.
 */
.header-switchers {
    --hu-ink: #1d2127;
    --hu-text: #59606a;
    --hu-icon: #9aa1aa;
    --hu-accent: #d40a00;
    --hu-rule: #e6e8eb;
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}
.header-row .header-switchers .top-links .top-links-inline .links ul { display: flex; align-items: center; margin: 0; }
.header-row .header-switchers .top-links .top-links-inline .links li {
    float: none;
    display: flex;
    align-items: center;
    padding: 0 16px;
    line-height: 30px;
    border-left: 0;
    position: relative;
}
.header-row .header-switchers .top-links .top-links-inline .links li:last-child { padding-right: 0; }
.header-row .header-switchers .top-links .top-links-inline .links li + li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 14px;
    margin-top: -7px;
    background: var(--hu-rule);
}
.header-row .header-switchers .top-links .top-links-inline .links li a {
    position: relative;
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .01em;
    color: var(--hu-text) !important;
    text-decoration: none !important;
    vertical-align: middle;
    white-space: nowrap;
    transition: color .2s ease;
}
.header-row .header-switchers .top-links .top-links-inline .links li a b { color: inherit !important; font-weight: inherit; }
.header-row .header-switchers .top-links .top-links-inline .links li a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.header-row .header-switchers .top-links .top-links-inline .links li a:hover, .header-row .header-switchers .top-links .top-links-inline .links li a:focus-visible { color: var(--hu-ink) !important; }
.header-row .header-switchers .top-links .top-links-inline .links li a:hover::after, .header-row .header-switchers .top-links .top-links-inline .links li a:focus-visible::after { transform: scaleX(1); }
.header-row .header-switchers .top-links .top-links-inline .links li a:focus-visible { outline: 2px solid var(--hu-accent); outline-offset: 3px; border-radius: 2px; }

/* The two links the shop wants seen: darker, heavier text. */
.header-row .header-switchers .top-links .top-links-inline .links li a[href*="trackyourorder"],
.header-row .header-switchers .top-links .top-links-inline .links li a[href*="recentwork"] { color: var(--hu-ink) !important; font-weight: 600; }
.header-row .header-switchers .top-links .top-links-inline .links li a[href*="recentwork"]:hover { color: var(--hu-accent) !important; }

/* Currency: quiet label, bold code, chevron that flips while the list is open. */
.header-row .header-switchers .header-button.currency-list { margin-left: 0; padding-right: 16px; position: relative; }
.header-row .header-switchers .header-button.currency-list::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 1px;
    height: 14px;
    margin-top: -7px;
    background: var(--hu-rule);
}
.header-row .header-switchers .header-button.full_mode .header-button-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 30px;
    color: var(--hu-text);
    transition: color .2s ease;
}
.header-row .header-switchers .header-button.full_mode .header-button-title .label {
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 30px;
    color: var(--hu-text);
    vertical-align: middle;
}
.header-row .header-switchers .header-button.full_mode .header-button-title .current {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: .02em;
    color: var(--hu-ink);
    vertical-align: middle;
}
.header-row .header-switchers .header-button.full_mode .header-button-title .current::after {
    content: "";
    width: 14px;
    height: 14px;
    font-size: 0;
    background: var(--hu-icon);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
    transition: transform .25s ease, background-color .2s ease;
}
.header-row .header-switchers .header-button.full_mode .header-button-title:hover .current { color: var(--hu-ink); }
.header-row .header-switchers .header-button.full_mode .header-button-title:hover .current::after { background: var(--hu-accent); }
.header-row .header-switchers .header-button.full_mode.active .header-button-title .current::after { transform: rotate(180deg); }
.header-row .header-switchers .header-button.currency-list ul.pc-list { right: 16px; }

@media (prefers-reduced-motion: reduce) {
    .header-switchers * { transition: none !important; }
}
