/* Heritage language switcher — in the account header or floating on auth pages. */
.heritage-language-box { align-items:center; display:inline-flex; justify-content:center; gap:7px; padding:7px 10px; border:1px solid #dbe3ee; background:#fff; border-radius:11px; color:#264365; font-weight:700; min-height:37px; white-space:nowrap; box-shadow:0 2px 8px rgba(28,48,73,.04); }
.heritage-language-box select { border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; outline:none; }
.heritage-lang-icon { font-size:18px; }
body:not(:has(.sidebar)) > .heritage-language-box { position:fixed; top:22px; right:23px; z-index:150; }
header > .heritage-language-box { margin-left:10px; flex-shrink:0; }
@media (max-width:700px) { header > .heritage-language-box { margin-left:3px; padding:5px; } .heritage-lang-icon { display:none; } }

/* v1.0.4: fixed, compact picker. Login pages do not need an authenticated session to load this CSS. */
.auth-language-switch {
  position: absolute; top: clamp(12px, 2.5vh, 24px); right: clamp(14px, 3vw, 30px);
  z-index: 30; width: auto; min-width: 82px; height: 38px;
  display: inline-flex; flex-direction: row; padding: 5px 10px;
}
.auth-language-switch select { width: auto; min-width: 42px; padding: 0; appearance: auto; }
@media (max-width: 600px) {
  .auth-language-switch { top: 12px; right: 12px; }
}

/* PMT Heritage 1.0.6: aligned, compact account actions in the authenticated header. */
header > div:nth-child(2) { min-width: 0; }
header > div:nth-child(2) h1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.heritage-header-actions {
  margin-left:auto; display:flex; align-items:center; justify-content:flex-end;
  gap:16px; min-width:0; flex:0 0 auto;
}
header .heritage-account {
  margin:0; display:flex; align-items:center; justify-content:flex-end;
  gap:11px; flex:0 1 auto; min-width:0;
}
header .heritage-account > span {
  width:43px; height:43px; border-radius:13px; flex:0 0 43px;
  background:#eaf1fd; color:#354965; font-size:12px; font-weight:750;
}
header .heritage-account .heritage-account-details {
  display:flex; flex-direction:column; justify-content:center; min-width:0;
  max-width:200px; gap:1px;
}
header .heritage-account .heritage-account-details strong {
  display:block; font-size:13px; font-weight:750; line-height:1.25;
  color:#344053; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
header .heritage-account .heritage-account-details small {
  color:#788396; font-size:11px; line-height:1.4;
}
header .heritage-account .heritage-signout {
  flex:0 0 38px; display:grid; place-items:center;
  width:38px; height:38px; margin-left:5px; padding:0;
  border:1px solid #e0e5ec; border-radius:10px;
  color:#52657e; background:#fff; transition:background .16s ease,border-color .16s ease;
}
header .heritage-account .heritage-signout:hover,
header .heritage-account .heritage-signout:focus-visible {
  background:#f0f5fc; border-color:#b7c7da;
}
header .heritage-header-language {
  flex:0 0 auto; display:inline-flex; flex-direction:row; justify-content:center; align-items:center;
  position:relative; margin:0; gap:8px;
  width:96px; height:40px; min-height:40px; padding:0 13px;
  border:1px solid #dce3ed; border-radius:11px; background:#fff;
  box-shadow:0 4px 12px rgba(28,48,73,.05);
  color:#294568;
}
header .heritage-header-language .heritage-lang-icon {
  display:block; width:17px; height:17px; flex:0 0 17px;
}
header .heritage-header-language select {
  border:0; appearance:none; -webkit-appearance:none;
  padding:0 13px 0 0; margin:0; width:40px; min-width:40px; height:38px;
  background:transparent; color:#294568;
  font:700 12px 'DM Sans',sans-serif; cursor:pointer; outline-offset:3px;
}
header .heritage-header-language::after {
  content:''; position:absolute; right:13px; top:14px;
  width:6px; height:6px; border-right:1.7px solid #294568;
  border-bottom:1.7px solid #294568; transform:rotate(45deg); pointer-events:none;
}
@media (max-width:1040px) {
  header { padding-left:26px; padding-right:26px; }
  .heritage-header-actions { gap:11px; }
  header .heritage-account .heritage-account-details { max-width:146px; }
}
@media (max-width:760px) {
  header { gap:10px; padding:0 14px; }
  header > div:nth-child(2) { flex:1 1 auto; }
  .heritage-header-actions { gap:8px; }
  header .heritage-account .heritage-account-details { display:none; }
  header .heritage-account { gap:5px; }
  header .heritage-account > span { width:35px; height:35px; flex-basis:35px; border-radius:10px; }
  header .heritage-account .heritage-signout { width:34px; height:34px; flex-basis:34px; margin:0; }
  header .heritage-header-language { width:75px; height:36px; min-height:36px; padding:0 9px; gap:5px; }
  header .heritage-header-language .heritage-lang-icon { width:14px; height:14px; flex-basis:14px; }
  header .heritage-header-language select { font-size:11px; width:37px; min-width:37px; height:34px; padding-right:11px; }
  header .heritage-header-language::after { right:9px; top:12px; width:5px; height:5px; }
}
@media (max-width:450px) {
  header { gap:7px; padding:0 10px; }
  header h1 { font-size:15px; }
  header .eyebrow { font-size:8px; letter-spacing:.09em; }
  header .heritage-account > span { display:none; }
  .heritage-header-actions { gap:6px; }
}
