/* Shared browsing preferences. All color surfaces follow the published theme. */
html.weeby-preferences-is-open { overflow: hidden; }
body.weeby-theme .weeby-preferences-trigger {
  --preferences-control-bg: var(--ws-paper,#fff);
  --preferences-control-ink: var(--ws-ink,#031059);
  --preferences-control-line: var(--ws-line,#c9ddff);
  --preferences-control-hover: var(--ws-soft,#eef5ff);
  --preferences-control-hover-ink: var(--ws-on-soft,#031059);
  appearance: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; flex: 0 0 auto; min-width: 0; min-height: 40px; max-width: 100%;
  margin: 0; padding: 9px 11px; border: 1px solid var(--preferences-control-line);
  border-radius: var(--weeby-radius,8px); background: var(--preferences-control-bg);
  color: var(--preferences-control-ink); font: inherit; font-size: 12px;
  font-weight: 550; line-height: 1.35; letter-spacing: normal; text-transform: none;
  text-align: start; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: none; vertical-align: middle;
  transition: background-color .18s ease,border-color .18s ease,box-shadow .18s ease;
}
body.weeby-theme .weeby-preferences-trigger:hover,
body.weeby-theme .weeby-preferences-trigger[aria-expanded="true"] {
  background: var(--preferences-control-hover); color: var(--preferences-control-hover-ink); border-color: var(--ws-action,#0064d6);
}
body.weeby-theme .weeby-preferences-trigger:focus-visible,
body.weeby-theme .weeby-preferences-dialog :is(a,button,select):focus-visible {
  outline: 2px solid var(--ws-focus,#007bfc); outline-offset: 3px;
}
body.weeby-theme .weeby-preferences-trigger > svg { display: block; flex: none; max-width: none; }
body.weeby-theme .weeby-preferences-globe { width: 18px; height: 18px; }
body.weeby-theme .weeby-preferences-chevron { width: 14px; height: 14px; transition: transform .18s ease; opacity: .75; }
body.weeby-theme .weeby-preferences-trigger[aria-expanded="true"] .weeby-preferences-chevron { transform: rotate(180deg); }
body.weeby-theme .weeby-preferences-current { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
body.weeby-theme .weeby-preferences-language { overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
body.weeby-theme .weeby-preferences-currency { display: inline-block; font-size: 11px; font-weight: 650; line-height: 1.2; }
body.weeby-theme .weeby-preferences-language + .weeby-preferences-currency { padding-inline-start: 9px; border-inline-start: 1px solid var(--preferences-control-line); }
body.weeby-theme .site-footer .weeby-preferences-trigger {
  --preferences-control-bg: var(--ws-navy-soft,#172366);
  --preferences-control-ink: var(--ws-on-navy,#fff);
  --preferences-control-line: var(--ws-navy-line,#303b77);
  --preferences-control-hover: var(--ws-navy,#031059);
  --preferences-control-hover-ink: var(--ws-on-navy,#fff);
}
body.weeby-theme .site-footer .weeby-preferences-trigger:hover,
body.weeby-theme .site-footer .weeby-preferences-trigger[aria-expanded="true"] { border-color: var(--ws-navy-muted,#c6dafa); }
body.weeby-theme .weeby-preferences-dialog {
  position: fixed; inset: 0; z-index: 1301; box-sizing: border-box;
  width: min(600px,calc(100% - 32px)); min-width: 0; max-width: none;
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  margin: auto; padding: 0; border: 1px solid var(--ws-line,#c9ddff);
  border-radius: 16px; background: var(--ws-paper,#fff); color: var(--ws-ink,#031059);
  font-family: var(--weeby-font,Inter,Arial,sans-serif); font-size: 14px;
  text-align: start; box-shadow: 0 28px 90px color-mix(in srgb,var(--ws-navy,#031059) 21%,transparent);
}
body.weeby-theme .weeby-preferences-dialog:not([open]),
body.weeby-theme .weeby-preferences-dialog[hidden] { display: none; }
body.weeby-theme .weeby-preferences-dialog[open] { display: flex; flex-direction: column; }
body.weeby-theme .weeby-preferences-dialog::backdrop { background: color-mix(in srgb,var(--ws-navy,#031059) 46%,transparent); backdrop-filter: blur(3px); }
body.weeby-theme .weeby-preferences-backdrop {
  position: fixed; inset: 0; z-index: 1300; background: color-mix(in srgb,var(--ws-navy,#031059) 46%,transparent);
  backdrop-filter: blur(3px);
}
body.weeby-theme .weeby-preferences-backdrop[hidden] { display: none; }
body.weeby-theme .weeby-preferences-heading { display: flex; align-items: flex-start; gap: 16px; padding: 26px; border-bottom: 1px solid var(--ws-line,#c9ddff); flex: none; }
body.weeby-theme .weeby-preferences-heading > div { flex: 1; min-width: 0; }
body.weeby-theme .weeby-preferences-heading h2 { margin: 0; color: var(--ws-ink,#031059); font: inherit; font-size: 23px; font-weight: 650; line-height: 1.3; letter-spacing: -.035em; }
body.weeby-theme .weeby-preferences-heading p { margin: 8px 0 0; color: var(--ws-muted,#395a8c); font-size: 13px; line-height: 1.6; }
body.weeby-theme .weeby-preferences-close { appearance: none; display: grid; place-items: center; width: 36px; height: 36px; flex: none; margin: -2px -2px 0 0; padding: 7px; border: 1px solid var(--ws-line,#c9ddff); border-radius: 9px; background: var(--ws-paper,#fff); color: var(--ws-muted,#395a8c); cursor: pointer; transition: background-color .18s ease,color .18s ease; }
body.weeby-theme .weeby-preferences-close:hover { background: var(--ws-soft,#eef5ff); color: var(--ws-ink,#031059); }
body.weeby-theme .weeby-preferences-close svg { display: block; width: 20px; height: 20px; }
body.weeby-theme .weeby-preferences-body { padding: 26px; overflow: auto; overscroll-behavior: contain; min-height: 0; }
body.weeby-theme .weeby-preferences-section + .weeby-preferences-section { margin-top: 25px; padding-top: 24px; border-top: 1px solid var(--ws-line,#c9ddff); }
body.weeby-theme .weeby-preferences-section h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--ws-ink,#031059); font: inherit; font-size: 14px; font-weight: 650; }
body.weeby-theme .weeby-preferences-section h3 svg { display: block; width: 18px; height: 18px; flex: none; color: var(--ws-link-on-paper,#0064d6); }
body.weeby-theme .weeby-language-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
body.weeby-theme .weeby-language-options a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 47px; min-width: 0; padding: 11px 12px; border: 1px solid var(--ws-line,#c9ddff); border-radius: 9px; background: var(--ws-paper,#fff); color: var(--ws-ink,#031059); font-size: 13px; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; transition: background-color .18s ease,border-color .18s ease; }
body.weeby-theme .weeby-language-options a svg { display: block; width: 16px; height: 16px; flex: none; color: var(--ws-link-on-paper,#0064d6); }
body.weeby-theme .weeby-language-options a:hover,
body.weeby-theme .weeby-language-options a.is-current { border-color: var(--ws-action-border,#0064d6); background: var(--ws-soft,#eef5ff); color: var(--ws-on-soft,#031059); }
body.weeby-theme .weeby-language-options a.is-current { font-weight: 600; }
body.weeby-theme .weeby-language-options a:hover svg,
body.weeby-theme .weeby-language-options a.is-current svg { color: var(--ws-link-on-soft,var(--ws-on-soft,#031059)); }
body.weeby-theme .weeby-currency-preferences { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
body.weeby-theme .weeby-currency-preferences select { box-sizing: border-box; flex: 1 1 160px; width: auto; max-width: 100%; min-width: 0; min-height: 45px; margin: 0; padding: 10px 12px; border: 1px solid var(--ws-line,#c9ddff); border-radius: 9px; background: var(--ws-paper,#fff); color: var(--ws-ink,#031059); font: inherit; font-size: 13px; line-height: 1.5; }
body.weeby-theme .weeby-currency-preferences button { appearance: none; display: inline-flex; align-items: center; justify-content: center; flex: 0 1 auto; min-width: 0; min-height: 45px; max-width: 100%; margin: 0; padding: 10px 17px; border: 1px solid var(--ws-action-border,#0064d6); border-radius: 9px; background: var(--ws-action,#0064d6); color: var(--ws-on-action,#fff); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.5; cursor: pointer; transition: background-color .18s ease; }
body.weeby-theme .weeby-currency-preferences button:hover { background: var(--ws-action-hover,#0055b8); color: var(--ws-on-action-hover,#fff); }
body.weeby-theme .weeby-preferences-locked { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid var(--ws-line,#c9ddff); border-radius: 10px; background: var(--ws-soft,#eef5ff); }
body.weeby-theme .weeby-preferences-locked > svg { width: 18px; height: 18px; margin-top: 2px; flex: none; color: var(--ws-link-on-soft,var(--ws-on-soft,#031059)); }
body.weeby-theme .weeby-preferences-locked strong { display: inline-block; color: var(--ws-on-soft,#031059); font-size: 14px; line-height: 1.4; }
body.weeby-theme .weeby-preferences-locked p { margin: 5px 0 0; color: var(--ws-on-soft,#031059); font-size: 12px; line-height: 1.65; }
body.weeby-theme .weeby-public-preferences { display: flex; justify-content: flex-end; padding: 8px max(16px,calc((100% - 1240px)/2)); background: var(--ws-paper,#fff); border-bottom: 1px solid var(--ws-line,#c9ddff); }
body.weeby-theme .weeby-document-preferences { display: flex; justify-content: flex-end; padding: 12px 18px; color: var(--ws-ink,#031059); }
body.weeby-theme .weeby-preferences-nojs { padding: 14px 20px; background: var(--ws-paper,#fff); color: var(--ws-ink,#031059); }
body.weeby-theme .weeby-preferences-nojs a { display: inline-block; padding: 10px; }
body.weeby-theme .weeby-preferences-dialog .weeby-preferences-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
html[dir="rtl"] body.weeby-theme .weeby-preferences-heading h2 { letter-spacing: normal; }
html[dir="rtl"] body.weeby-theme .weeby-preferences-dialog { font-family: var(--weeby-font-ar,Tahoma,Arial,sans-serif); }
@media (max-width:767px) {
  body.weeby-theme .weeby-preferences-compact { width: 38px; min-height: 38px; height: 38px; padding: 9px; gap: 0; }
  body.weeby-theme .weeby-preferences-compact > .weeby-preferences-current,
  body.weeby-theme .weeby-preferences-compact > .weeby-preferences-chevron { display: none; }
}
@media (max-width:575px) {
  body.weeby-theme .weeby-preferences-dialog { width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  body.weeby-theme .weeby-preferences-heading,
  body.weeby-theme .weeby-preferences-body { padding: 20px; }
  body.weeby-theme .weeby-preferences-heading h2 { font-size: 21px; }
  body.weeby-theme .weeby-language-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.weeby-theme .weeby-currency-preferences button { flex: 1 1 120px; }
}
@media (prefers-reduced-motion: reduce) {
  body.weeby-theme .weeby-preferences-trigger,
  body.weeby-theme .weeby-preferences-chevron,
  body.weeby-theme .weeby-preferences-dialog * { transition: none; }
}
@media print {
  body.weeby-theme .weeby-preferences-trigger,
  body.weeby-theme .weeby-preferences-dialog,
  body.weeby-theme .weeby-preferences-backdrop,
  body.weeby-theme .weeby-document-preferences { display: none !important; }
}
