/* Customer panel: The app header bar at every width: tokens, geometry, the brand, the shared icon button, badges and the
   language control in the bar. This file is the one authority for .app-header layout; no other stylesheet sizes it. */
/* IT4Y_CUSTOMER_HEADER_START
   One row at every width (nowrap). Phones and tablets (900px and below): a 60px bar with the menu, the brand and 44px
   icon buttons. Desktop: the 54px bar with the search field, the icon buttons and the full language name. Icons are
   currentColor masks (data: SVG, strict CSP), so both themes and both directions apply without per-theme rules. */
.app-shell>.app-header{--hdr-h:var(--header-h);--hdr-pad:22px;--hdr-gap:14px;--hdr-btn:40px;--hdr-ico:20px;--hdr-radius:12px;
  --hdr-hover:color-mix(in srgb,var(--text) 7%,transparent);--hdr-press:color-mix(in srgb,var(--text) 12%,transparent);
  --hdr-ring:var(--accent);--badge-h:17px;--badge-ring:var(--panel);--badge-alert:var(--danger);--badge-count:var(--accent);
  --badge-ink:#fff;grid-column:1/-1;z-index:50;display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;
  gap:12px;box-sizing:border-box;block-size:var(--hdr-h);min-block-size:var(--hdr-h);padding-block:0;padding-inline:var(--hdr-pad);
  background:var(--panel);border-bottom:1px solid var(--border)}
html[data-theme="dark"] .app-shell>.app-header{--badge-ink:#0b1220}
.app-shell>.app-header .brand{display:flex;flex:0 1 auto;align-items:center;gap:8px;min-inline-size:0}
.app-shell>.app-header .right{display:flex;flex:0 0 auto;flex-wrap:nowrap;align-items:center;gap:var(--hdr-gap);min-inline-size:0;font-size:13px}
.app-shell>.app-header .session-info{white-space:nowrap}

/* The brand: one link home. The official IT-4You SWE full logo (the navy badge) reads on light and dark themes alike;
   the brand name stays in the link for assistive technology only, because the badge shows it. */
.app-header .brand-link{display:inline-flex;align-items:center;gap:8px;min-inline-size:0;border-radius:8px;color:var(--text);text-decoration:none}
.app-header .brand-link{min-block-size:44px}
.app-header .brand-link:hover{text-decoration:none}
.app-header .brand-link:focus-visible{outline:2px solid var(--hdr-ring);outline-offset:2px}
.app-header .brand-icon-slot{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;line-height:0}
.app-header .brand-logo{display:block;block-size:44px;inline-size:auto;aspect-ratio:253/146}
.app-header .brand-text{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-header .brand-text-name{position:absolute;inline-size:1px;block-size:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0}
.app-header .brand-sub{color:var(--text-dim);font-size:13px;font-weight:500}

/* The one icon button: menu, search, cart, notifications and theme. */
.app-header .icon-btn{position:relative;display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;box-sizing:border-box;
  inline-size:var(--hdr-btn);block-size:var(--hdr-btn);min-inline-size:var(--hdr-btn);margin:0;padding:0;border:0;border-radius:var(--hdr-radius);
  background:transparent;box-shadow:none;color:var(--text);font:inherit;line-height:1;cursor:pointer;touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;transition:background-color .12s ease,transform .08s ease}
.app-header .icon-btn:hover{background:var(--hdr-hover)}
.app-header .icon-btn:active{background:var(--hdr-press);transform:scale(.96)}
.app-header .icon-btn:focus-visible{outline:2px solid var(--hdr-ring);outline-offset:-2px}
.app-header .icon-btn[aria-expanded="true"]{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent)}
.app-header .icon-btn:disabled{cursor:default;opacity:.4}
.icon[class*="icon--"]{display:block;flex:0 0 auto;inline-size:var(--hdr-ico,20px);block-size:var(--hdr-ico,20px);background:currentColor;
  -webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
:root{
  --i-menu:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
  --i-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
  --i-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E");
  --i-cart:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E\
%3Cpath d='M2.5 3h2.6l2.3 11.2a2 2 0 0 0 2 1.6h8a2 2 0 0 0 2-1.5L21.5 7H6.1'/%3E%3C/svg%3E");
  --i-bell:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E\
%3Cpath d='M6 8.5a6 6 0 0 1 12 0c0 6.5 2.5 8.5 2.5 8.5h-17S6 15 6 8.5'/%3E%3Cpath d='M10.2 20.5a2 2 0 0 0 3.6 0'/%3E%3C/svg%3E");
  --i-sun:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E\
%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
  --i-moon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z'/%3E%3C/svg%3E");
  --i-copy:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' \
stroke-width='2' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E\
%3Cpath d='M5 15V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E");
}
.icon--menu{--icon:var(--i-menu)}
.icon--close{--icon:var(--i-close)}
.icon--search{--icon:var(--i-search)}
.icon--cart{--icon:var(--i-cart)}
.icon--bell{--icon:var(--i-bell)}
.icon--sun{--icon:var(--i-sun)}
.icon--moon{--icon:var(--i-moon)}
.icon--copy{--icon:var(--i-copy)}
.app-header .hamburger[aria-expanded="true"] .icon{--icon:var(--i-close)}

/* Count badges on the cart (accent) and notifications (alert) buttons; a zero count carries the hidden attribute. */
.app-header .icon-btn__badge{position:absolute;inset-block-start:5px;inset-inline-end:4px;display:inline-flex;align-items:center;
  justify-content:center;box-sizing:border-box;min-inline-size:var(--badge-h);block-size:var(--badge-h);padding:0 4px;border-radius:9px;
  background:var(--badge-count);box-shadow:0 0 0 2px var(--badge-ring);color:var(--badge-ink);font-size:10px;font-weight:700;line-height:1;
  font-variant-numeric:tabular-nums;pointer-events:none}
.app-header .notif-bell .icon-btn__badge{background:var(--badge-alert)}
.app-header .icon-btn__badge[hidden]{display:none}
.app-header .icon-btn__badge.is-pop{animation:hdr-badge-pop .15s ease-out}
@keyframes hdr-badge-pop{from{transform:scale(.6)}to{transform:scale(1)}}
.app-header .notif-bell-wrap{position:relative;display:inline-flex;flex:0 0 auto;align-items:center;margin:0}

/* Search: a labelled field with its shortcut on desktop, an icon button in the bar on phones and tablets. */
.app-header .cmd-trigger.icon-btn{inline-size:auto;gap:8px;padding-inline:10px 6px;border:1px solid var(--border-soft);border-radius:8px;
  background:var(--panel-2);color:var(--text-dim);font-size:12px}
.app-header .cmd-trigger.icon-btn:hover{background:var(--border-soft);color:var(--text)}
.app-header .cmd-trigger .icon{--hdr-ico:16px}
.app-header .cmd-trigger kbd{padding:1px 5px;border-radius:3px;background:var(--bg);color:var(--muted);font-family:ui-monospace,monospace;
  font-size:10px;white-space:nowrap}

/* The one language picker, in the bar's ghost style (same component as every other page; variants are CSS only). */
.app-header .right .locale-picker{flex:0 0 auto}
.app-header .locale-trigger{block-size:var(--hdr-btn);min-block-size:var(--hdr-btn);max-inline-size:none;gap:6px;padding-inline:10px;border:0;
  border-radius:var(--hdr-radius);background:transparent;color:var(--text)}
.app-header .locale-trigger:hover{background:var(--hdr-hover)}
.app-header .locale-trigger:focus-visible{outline:2px solid var(--hdr-ring);outline-offset:-2px}
.app-header .locale-picker[data-open] .locale-trigger{background:color-mix(in srgb,var(--accent) 12%,transparent);box-shadow:none;
  color:var(--accent)}
.app-header .locale-globe{inline-size:var(--hdr-ico);block-size:var(--hdr-ico);color:currentColor}

/* The hamburger only exists where the sidebar is a drawer. */
.app-header .hamburger.icon-btn{display:none}
.skip-link:focus{z-index:1300}

@media(max-width:900px){
  /* One bar height for the bar, the page grid row and the drawer under it. */
  :root{--header-h:60px}
  /* The safe-area insets are physical (the notch side): inline start is the left inset in LTR and the right inset in RTL. */
  .app-shell>.app-header{--hdr-pad:12px;--hdr-gap:2px;--hdr-btn:44px;--hdr-ico:22px;position:sticky;inset-block-start:0;
    gap:8px;padding-inline:max(12px,env(safe-area-inset-left,0px)) max(12px,env(safe-area-inset-right,0px));
    border-bottom-color:transparent;box-shadow:none;transition:box-shadow .15s ease,border-color .15s ease}
  html[dir="rtl"] .app-shell>.app-header{padding-inline:max(12px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-left,0px))}
  .app-shell>.app-header[data-scrolled]{border-bottom-color:var(--border-soft);box-shadow:var(--shadow-sm)}
  html.sb-open .app-shell>.app-header{z-index:1210}
  .app-shell>.app-header .brand{flex:1 1 auto;overflow:hidden}
  .app-header .hamburger.icon-btn{display:inline-flex}
  .app-header .session-info,.app-header .it4y-hdr-signout{display:none!important}
  .app-header .cmd-trigger .lbl,.app-header .cmd-trigger kbd{display:none!important}
  .app-header .theme-toggle{display:none}
  .app-header .cmd-trigger.icon-btn{inline-size:var(--hdr-btn);padding:0;border:0;border-radius:var(--hdr-radius);background:transparent;
    color:var(--text)}
  .app-header .cmd-trigger.icon-btn:hover{background:var(--hdr-hover)}
  .app-header .cmd-trigger .icon{--hdr-ico:22px}
  .app-header .brand-sub{display:none}
  .app-header .brand-logo{block-size:40px}
}
@media(max-width:600px){
  .app-shell>.app-header{gap:4px}
  .app-header .right .locale-chevron{display:none}
  .app-header .right .locale-value{font-size:0;line-height:1}
  .app-header .right .locale-value::before{content:attr(lang);content:attr(lang) / "";font-size:13px;font-weight:700;letter-spacing:.02em;
    text-transform:uppercase}
}
/* Widths measured with the real logo: the language code from 400px, the globe alone below; the logo never hides. */
@media(max-width:399px){
  .app-header .right .locale-value{display:none}
  .app-header .locale-trigger{inline-size:var(--hdr-btn);padding:0;justify-content:center}
}
@media(max-width:419px){
  .app-header .right .locale-value[lang*="-"]{display:none}
  .app-header .locale-trigger:has(.locale-value[lang*="-"]){inline-size:var(--hdr-btn);padding:0;justify-content:center}
}
@media(max-width:369px){
  .app-header .brand-logo{block-size:34px}
}
@media(max-width:339px){
  .app-shell>.app-header,html[dir="rtl"] .app-shell>.app-header{padding-inline:8px}
  .app-shell>.app-header .right{gap:0}
}
@media(width>900px){
  .app-header .brand-sub{display:inline}
  .app-shell>.app-header .brand{flex:0 0 auto}
  .app-shell>.app-header .right{flex:0 1 auto}
  .app-shell>.app-header .right>*{flex-shrink:0}
  .app-shell>.app-header .right>.session-info{flex:0 1 auto;min-inline-size:0;overflow:hidden;text-overflow:ellipsis}
}
/* The bell panel and the cart popover hang from the bar's end edge; on phones both span the viewport under the bar,
   so neither can open off-screen in either direction. */
@media(max-width:600px){
  .app-header .notif-bell-wrap .notif-bell-panel,.app-header .right .it4y-cart-pop{position:fixed;inset-block-start:calc(var(--hdr-h) + 8px);
    inset-inline:12px;width:auto;max-width:none;margin:0}
  .app-header .notif-bell-wrap .notif-bell-panel{max-height:calc(100dvh - var(--hdr-h) - 20px)}
}
/* Narrow desktops: the session line yields first, then the subtitle, so the bar never squeezes the brand. */
@media(900px<width<=1240px){
  .app-header .session-info{display:none}
}
@media(900px<width<=1040px){
  .app-header .brand-sub{display:none}
}
@media(prefers-reduced-motion:reduce){
  .app-header .icon-btn,.app-shell>.app-header{transition:none}
  .app-header .icon-btn:active{transform:none}
  .app-header .icon-btn__badge.is-pop{animation:none}
}
@media print{
  .app-shell>.app-header{display:none}
}
/* IT4Y_CUSTOMER_HEADER_END */
