/* SOFON FTP PHASE02 — Convertor/Calculator-inspired unified glass header.
   The selector scope is limited to site/app header and the FTP language menu. */
.site-header, .app-header {
  position: sticky;
  top: 10px;
  z-index: 35;
  width: min(1280px, calc(100% - 40px));
  margin: 16px auto 0;
  padding: 4px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.site-header > .header-inner,
.app-header > .app-header-inner {
  width: 100%;
  min-height: 62px;
  margin-inline: 0;
  max-width: none;
}
.site-header .header-actions,
.app-header .app-user { gap: 10px; }
.site-header .header-actions > .button,
.site-header .header-actions > .theme-toggle,
.app-header .app-user > .theme-toggle,
.app-header .app-user > .button {
  min-height: 42px;
  border-radius: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
}
.site-header .brand-mark, .app-header .brand-mark { border-radius: 13px; }

.sofon-ftp-locale {
  position: relative;
  flex: 0 0 auto;
  z-index: 42;
  font-size: .86rem;
  font-weight: 750;
}
.sofon-ftp-locale-trigger,
.sofon-ftp-locale-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.sofon-ftp-locale-trigger [data-current-flag],
.sofon-ftp-locale-option [data-other-flag] { font-size: 1.15rem; }
.sofon-ftp-locale-trigger svg {
  width: 11px;
  height: 11px;
  opacity: .72;
  transition: transform .18s ease;
}
.sofon-ftp-locale-trigger:hover,
.sofon-ftp-locale-option:hover { border-color: var(--green); }
.sofon-ftp-locale-trigger:focus-visible,
.sofon-ftp-locale-option:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.sofon-ftp-locale-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 43;
  min-width: 100%;
  padding: 6px 0 0;
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.sofon-ftp-locale-option {
  width: 100%;
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.sofon-ftp-locale.is-open .sofon-ftp-locale-menu,
.sofon-ftp-locale:focus-within .sofon-ftp-locale-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.sofon-ftp-locale.is-open .sofon-ftp-locale-trigger svg { transform: rotate(180deg); }
@media (hover:hover) and (pointer:fine) {
  .sofon-ftp-locale:hover .sofon-ftp-locale-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .sofon-ftp-locale:hover .sofon-ftp-locale-trigger svg { transform: rotate(180deg); }
}
@media (max-width:700px) {
  .site-header, .app-header { width: calc(100% - 24px); margin-top: 12px; padding: 8px; border-radius: 20px; }
  .site-header > .header-inner,
  .app-header > .app-header-inner { gap: 8px; min-height: 48px; }
  .site-header .header-actions, .app-header .app-user { gap: 6px; }
  .sofon-ftp-locale-trigger, .sofon-ftp-locale-option { min-height: 40px; padding: 0 8px; gap: 4px; font-size: .79rem; }
  .site-header .header-actions > .button, .app-header .app-user > .button { padding: 8px 10px; }
  .brand { min-width: 0; gap: 7px; }
  .brand-mark { flex-shrink: 0; }
  .brand-copy strong { font-size: .87rem; }
}
@media (max-width:390px) {
  .site-header > .header-inner, .app-header > .app-header-inner { flex-wrap: wrap; }
  .header-actions, .app-user { margin-left:auto; }
  .app-header .brand-copy small, .site-header .brand-copy small { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .sofon-ftp-locale-menu,
  .sofon-ftp-locale-trigger svg { transition:none; }
}
