/* Stores bar (header-stores-bar.php): both tile stores at the top of the header, always in sight. A light bar in the
   grey of the search field, with only the Route buttons in magenta, in the shape of the Outlet flag (Kevin, 12-11-2026,
   about the first, magenta bar: "zeer duidelijk, maar mogelijks wel druk?"). */

/* The bar makes the fixed header higher. Everything placed against the header adds --to-sb-h: the header's own spacer and
   panels and the homepage hero below, sticky panels in their own stylesheets (calc(... + var(--to-sb-h,0px))). */
:root{--to-sb-h:40px}
@media(max-width:860px){:root{--to-sb-h:48px}}
/* A jump to an anchor, and a field that gets the focus, stay clear of the higher header: the browser adds this to the
   target's own scroll-margin-top. Every in-page link is the browser's to scroll (Tegeloutlet_Performance::body_class()),
   so a target or scroll marker never adds --to-sb-h itself. */
html{scroll-padding-top:var(--to-sb-h)}

#tgxHeader .to-sb{position:relative;z-index:3;height:var(--to-sb-h);background:#f2f6f4;color:#294338;font:400 13.5px/1.2 Poppins,system-ui,sans-serif;letter-spacing:0;-webkit-font-smoothing:antialiased}
#tgxHeader .to-sb *{box-sizing:border-box}
#tgxHeader .to-sb .tgx-container{height:100%;display:flex;align-items:center;justify-content:space-between;gap:28px}
/* Focus: a dark ring that stays inside the bar. The header's own ring is turquoise and 4px out: faint on this grey, and
   above the edge of the screen on the store link, which is as high as the bar. */
#tgxHeader .to-sb a:focus-visible{outline:2px solid #294338!important;outline-offset:2px}
#tgxHeader .to-sb a.to-sb-info:focus-visible{outline-offset:-2px}
/* A page cached with the first, magenta bar (before 1.0.2) still holds a pin per store and a second sentence, until the
   cache is purged. */
#tgxHeader .to-sb-pin,#tgxHeader .to-sb-intro>span{display:none}

/* The invitation: the house stripe, then one line. */
#tgxHeader .to-sb-intro{position:relative;flex:none;padding-left:14px;line-height:18px;white-space:nowrap}
#tgxHeader .to-sb-intro::before{content:"";position:absolute;left:3px;top:.5px;width:3px;height:17px;background:#c7017f;transform:skewX(16deg)}
#tgxHeader .to-sb-intro strong{font-weight:600}
#tgxHeader .to-sb-intro:hover strong{text-decoration:underline;text-underline-offset:3px}

/* The two stores: name, a dot, the opening line. */
#tgxHeader .to-sb-stores{flex:none;display:flex;align-items:center;list-style:none;margin:0 0 0 auto;padding:0;height:100%}
#tgxHeader .to-sb-store{position:relative;display:flex;align-items:center;gap:14px;height:100%;margin:0;padding:0}
#tgxHeader .to-sb-store+.to-sb-store{margin-left:22px;padding-left:22px}
#tgxHeader .to-sb-store+.to-sb-store::before{content:"";position:absolute;left:0;top:50%;width:1px;height:18px;margin-top:-9px;background:currentColor;opacity:.45}
#tgxHeader .to-sb-info{display:flex;align-items:center;gap:8px;height:100%;margin:0 -6px;padding:0 6px;white-space:nowrap}
#tgxHeader .to-sb-name{font-weight:600}
#tgxHeader .to-sb-info:hover .to-sb-name{text-decoration:underline;text-underline-offset:4px}
#tgxHeader .to-sb-status{display:inline-flex;align-items:center;gap:7px;margin-left:4px}
#tgxHeader .to-sb-status[hidden]{display:none}
#tgxHeader .to-sb-status i{flex:none;width:8px;height:8px;border-radius:50%}
/* Open and closed in the colours the header's other store lines have. */
#tgxHeader .to-sb-status.is-open{color:#487659}
#tgxHeader .to-sb-status.is-open i{background:#548464}
#tgxHeader .to-sb-status.is-closed{color:#5f6e5e}
#tgxHeader .to-sb-status.is-closed i{border:1.5px solid #5f6e5e}
#tgxHeader .to-sb-short{display:none}

/* Route: the Outlet flag, as a button; its slant is a ::before, so the focus ring is not clipped. */
#tgxHeader .to-sb-route{position:relative;z-index:0;display:inline-flex;align-items:center;gap:6px;height:27px;padding:0 19px 0 11px;color:#fff;font-size:13px;font-weight:600;line-height:1;white-space:nowrap}
#tgxHeader .to-sb-route::before{content:"";position:absolute;inset:0;z-index:-1;background:#c7017f;clip-path:polygon(0 0,100% 0,calc(100% - 9px) 100%,0 100%);transition:background-color .15s}
#tgxHeader .to-sb-route svg{flex:none;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#tgxHeader .to-sb-route:hover::before{background:#a3006a}

/* The stores left the main row (their dropdown stays in the template): the search takes the room. */
@media(min-width:861px){
#tgxHeader .tgx-main-actions>.tgx-main-action:first-child{display:none}
#tgxHeader .tgx-search{max-width:none}
}

/* The header's own measures, each with the bar's height: the spacer under the fixed header, the big menus and the
   dropdowns that may not run off the screen. */
.tgx-header-spacer#tgxHeaderSpacer{height:calc(124px + var(--to-sb-h))!important}
#tgxHeader .tgx-mega{max-height:calc(100dvh - 140px - var(--to-sb-h))}
#tgxHeader .tgx-dropdown{max-height:calc(100dvh - 90px - var(--to-sb-h))}
#tgxHeader .tgx-cart-dropdown-inner{max-height:calc(100dvh - 95px - var(--to-sb-h))}
body.admin-bar #tgxHeader .tgx-mega{max-height:calc(100dvh - 172px - var(--to-sb-h))}
body.admin-bar #tgxHeader .tgx-dropdown,body.admin-bar #tgxHeader .tgx-cart-dropdown-inner{max-height:calc(100dvh - 127px - var(--to-sb-h))}
/* The homepage hero fills the screen below the header: Catalogus gives it the spacer's height in --to-hero-header. */
html body.to-home-2{--to-hero-header:calc(124px + var(--to-sb-h))}

/* Without room for the longest opening line next to it ("Opent donderdag om 10:00" at both stores needs 1189px), the
   invitation goes. */
@media(max-width:1199px){#tgxHeader .to-sb-intro{display:none}#tgxHeader .to-sb-stores{margin:0 auto}}
@media(max-width:1000px){#tgxHeader .to-sb-store{gap:10px}#tgxHeader .to-sb-store+.to-sb-store{margin-left:16px;padding-left:16px}}

/* Phone: two cells, the name and Route on one line, the opening line below. The link to the store keeps a box of its
   own (the whole cell, with the Route flag on top of it), so its focus ring goes around the opening line, which may run on
   under the flag. */
@media(max-width:860px){
#tgxHeader .to-sb .tgx-container{width:100%;padding:0;gap:0}
#tgxHeader .to-sb-intro{display:none}
#tgxHeader .to-sb-stores{display:grid;grid-template-columns:1fr 1fr;width:100%;margin:0}
#tgxHeader .to-sb-store{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:22px auto;align-content:center;column-gap:6px;row-gap:3px;padding:0 10px 0 20px}
#tgxHeader .to-sb-store+.to-sb-store{margin-left:0;padding:0 16px 0 14px}
#tgxHeader .to-sb-store+.to-sb-store::before{height:30px;margin-top:-15px}
#tgxHeader .to-sb-info{grid-column:1 / -1;grid-row:1 / 3;flex-direction:column;align-items:flex-start;gap:3px;height:auto;min-width:0}
#tgxHeader .to-sb-name{font-size:13.5px;line-height:22px}
#tgxHeader .to-sb-status{margin-left:0;font-size:clamp(10.5px,3.07vw,11.5px);line-height:1.15;gap:6px;white-space:nowrap}
#tgxHeader .to-sb-status i{width:7px;height:7px}
#tgxHeader .to-sb-long{display:none}
#tgxHeader .to-sb-short{display:inline}
#tgxHeader .to-sb-route{grid-column:2;grid-row:1;height:22px;padding:0 14px 0 8px;font-size:11.5px;gap:5px}
#tgxHeader .to-sb-route::before{clip-path:polygon(0 0,100% 0,calc(100% - 7px) 100%,0 100%)}
#tgxHeader .to-sb-route svg{width:11px;height:11px}
/* A larger place to tap than the flag itself: the height of the bar, from the top of the cell to its foot. */
#tgxHeader .to-sb-route::after{content:"";position:absolute;inset:-5px -10px -21px -8px}
.tgx-header-spacer#tgxHeaderSpacer{height:calc(122px + var(--to-sb-h))!important}
html body.to-home-2{--to-hero-header:calc(122px + var(--to-sb-h))}
#tgxHeader .tgx-nav{top:calc(13px + var(--to-sb-h))}
#tgxHeader .tgx-mobile-backdrop:not([hidden]){inset:calc(122px + var(--to-sb-h)) 0 0}
#tgxHeader .tgx-mobile-panel.is-open{max-height:calc(100dvh - 122px - var(--to-sb-h))}
}
/* With the admin bar: 32px, 46px up to 782px wide. */
@media(max-width:860px){
body.admin-bar #tgxHeader .tgx-mobile-panel.is-open{max-height:calc(100dvh - 154px - var(--to-sb-h))}
body.admin-bar #tgxHeader .tgx-mobile-backdrop:not([hidden]){top:calc(154px + var(--to-sb-h))}
}
@media(max-width:782px){
body.admin-bar #tgxHeader .tgx-mobile-panel.is-open{max-height:calc(100dvh - 168px - var(--to-sb-h))}
body.admin-bar #tgxHeader .tgx-mobile-backdrop:not([hidden]){top:calc(168px + var(--to-sb-h))}
}
@media(max-width:374px){
#tgxHeader .to-sb-store{padding:0 8px 0 14px}
#tgxHeader .to-sb-store+.to-sb-store{padding:0 12px 0 10px}
}
@media(max-width:359px){
#tgxHeader .to-sb-name{font-size:13px}
#tgxHeader .to-sb-route svg{display:none}
#tgxHeader .to-sb-route{padding:0 13px 0 8px}
}
@media(max-width:339px){
#tgxHeader .to-sb-store{padding:0 6px 0 12px}
#tgxHeader .to-sb-store+.to-sb-store{padding:0 10px 0 8px}
}
/* French: "Itinéraire" is longer than "Route". On a phone the word goes without the arrow, on the narrowest phones the
   arrow without the word (the link keeps its aria-label). */
@media(max-width:860px){
#tgxHeader .to-sb:lang(fr) .to-sb-name{font-size:13px}
#tgxHeader .to-sb:lang(fr) .to-sb-route{padding:0 12px 0 7px;font-size:11px}
#tgxHeader .to-sb:lang(fr) .to-sb-route svg{display:none}
}
@media(max-width:359px){
#tgxHeader .to-sb:lang(fr) .to-sb-route{padding:0 13px 0 8px}
#tgxHeader .to-sb:lang(fr) .to-sb-route span{display:none}
#tgxHeader .to-sb:lang(fr) .to-sb-route svg{display:block}
}
