/* =====================================================================================================
   Oliyon Research — the shared header. One copy for every tool: Oliyon-Holdings/oliyonresearch
   docs/brand/header/oliyon-header.css. Copy it unchanged; set --oh-max to the tool's page width.

   One navy bar. Logo on the left; the links, the gold sign-in (or the account menu), the language
   switch and the flame on the right, all on one centred line. When that line does not fit — always on
   phones, and on narrower laptops when a tool has many links — the links fold into the ☰ menu: a list
   that opens under the bar. oliyon-header.js decides "does it fit" by measuring, so long Tamil labels
   and a signed-in reviewer's extra links never wrap or push anything off the screen.

   The navy gradient and kolam come from the tool's own .site-header rule; the flame badge from its .flame.
   ===================================================================================================== */

.oh { position: sticky; top: 0; z-index: 40; color: #fff; }
.oh-bar {
  position: relative; display: flex; align-items: center; gap: 8px;
  max-width: var(--oh-max, 1152px); height: 64px; margin: 0 auto; padding: 0 16px;
}
.oh-brand { display: flex; flex: none; align-items: center; margin-right: auto; line-height: 0; }
.oh-brand img { display: block; width: auto; height: 40px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.oh-end { display: flex; flex: none; align-items: center; gap: 8px; }

/* the language switch: a small outlined pill, whatever element the tool uses */
.oh-lang { display: flex; align-items: center; margin: 0; }
.oh-lang form { margin: 0; }
.oh-lang button, .oh-lang a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 13.5px; font-weight: 500;
  line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.oh-lang button:hover, .oh-lang a:hover { border-color: #feb001; background: rgba(255, 255, 255, .1); color: #fff; }

/* the living flame badge, always last */
.oh-flame { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; }
.oh-flame > * { width: 100% !important; height: 100% !important; }

/* ☰ — only when the links are folded */
.oh-menu-btn {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; background: transparent; color: #fff; cursor: pointer;
}
.oh-menu-btn:hover, .oh-menu-btn[aria-expanded="true"] { border-color: #feb001; background: rgba(255, 255, 255, .12); }
.oh-menu-btn svg { width: 22px; height: 22px; }
.oh-menu-btn .oh-i-close, .oh-menu-btn[aria-expanded="true"] .oh-i-menu { display: none; }
.oh-menu-btn[aria-expanded="true"] .oh-i-close { display: block; }

/* links, the gold button and the account menu — the folded (☰) look first */
.oh-nav { display: none; }
.oh.is-open .oh-nav {
  display: block; position: absolute; top: 100%; right: 0; left: 0; z-index: 41;
  max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto;
  padding: 8px 16px 16px; background: #001a45; border-top: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 28px rgba(0, 10, 30, .4);
}
.oh-links, .oh-account-menu { margin: 0; padding: 0; list-style: none; }
.oh-link, .oh-account-menu a, .oh-account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 0;
  border-radius: 8px; background: transparent; color: #fff; font: inherit; font-size: 16px; font-weight: 500;
  text-align: left; text-decoration: none; cursor: pointer;
}
.oh-link:hover, .oh-account-menu a:hover, .oh-account-menu button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.oh-link[aria-current="page"], .oh-account-menu a[aria-current="page"] { background: rgba(255, 255, 255, .1); box-shadow: inset 3px 0 #feb001; }
.oh-link small, .oh-account-menu small { font-size: 12.5px; font-weight: 400; opacity: .72; }
.oh-link svg, .oh-account-menu svg { flex: none; width: 20px; height: 20px; }
.oh-account-menu form { margin: 0; }
.oh-cta {
  display: flex; align-items: center; justify-content: center; height: 44px; margin-top: 10px; padding: 0 16px;
  border-radius: 6px; background: #e9a108; color: #001a45; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.oh-cta:hover { background: #feb001; color: #001a45; }
.oh-account { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .14); }
.oh-account-btn { display: none; }
.oh-account-name { display: block; padding: 6px 12px 4px; font-size: 13px; color: rgba(255, 255, 255, .7); }

/* optional: a search box in the bar (Nigandu). Folded, it is a full-width row under the bar, always in view. */
.oh-search { order: 10; flex: 1 0 100%; min-width: 0; margin: 0; padding: 0 0 10px; }
.oh-bar:has(.oh-search) { flex-wrap: wrap; height: auto; min-height: 64px; row-gap: 0; }
.oh-bar:has(.oh-search) > .oh-brand, .oh-bar:has(.oh-search) > .oh-end { height: 64px; }

/* one line: phones never; from 900 px when everything fits (oliyon-header.js adds .is-compact when not) */
@media (min-width: 900px) {
  .oh:not(.is-compact) .oh-bar { gap: 12px; height: 76px; padding: 0 24px; }
  .oh:not(.is-compact) .oh-brand img { height: 52px; }
  .oh:not(.is-compact) .oh-flame { width: 46px; height: 46px; }
  .oh:not(.is-compact) .oh-menu-btn { display: none; }
  .oh:not(.is-compact) .oh-bar:has(.oh-search) { flex-wrap: nowrap; height: 76px; }
  .oh:not(.is-compact) .oh-bar:has(.oh-search) > .oh-brand, .oh:not(.is-compact) .oh-bar:has(.oh-search) > .oh-end { height: auto; }
  .oh:not(.is-compact) .oh-search { order: 0; flex: 1 1 320px; min-width: 200px; max-width: 360px; padding: 0; }
  .oh:not(.is-compact) .oh-nav {
    display: flex; position: static; flex: none; align-items: center; gap: 8px; max-height: none; overflow: visible;
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  .oh:not(.is-compact) .oh-links { display: flex; align-items: center; gap: 2px; }
  .oh:not(.is-compact) .oh-link {
    width: auto; height: 40px; min-height: 0; padding: 0 12px; font-size: 15px; white-space: nowrap;
  }
  .oh:not(.is-compact) .oh-link small { margin-left: 2px; font-size: 12px; }
  .oh:not(.is-compact) .oh-link[aria-current="page"] { background: rgba(255, 255, 255, .12); box-shadow: inset 0 -2px #feb001; }
  .oh:not(.is-compact) .oh-cta { height: 36px; margin: 0 0 0 4px; padding: 0 16px; font-size: 14.5px; }
  .oh:not(.is-compact) .oh-account { position: relative; margin: 0 0 0 4px; padding: 0; border: 0; }
  .oh:not(.is-compact) .oh-account-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 8px;
    border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; background: transparent; color: #fff;
    font: inherit; font-size: 14.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
  }
  .oh:not(.is-compact) .oh-account-btn:hover,
  .oh:not(.is-compact) .oh-account-btn[aria-expanded="true"] { border-color: #feb001; background: rgba(255, 255, 255, .1); }
  .oh-account-btn svg { width: 20px; height: 20px; }
  .oh-account-btn .oh-caret { width: 14px; height: 14px; opacity: .8; }
  .oh-account-btn .oh-who { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }
  .oh:not(.is-compact) .oh-account-name { display: none; }
  .oh:not(.is-compact) .oh-account-menu {
    display: none; position: absolute; top: calc(100% + 10px); right: 0; z-index: 42; min-width: 230px; padding: 6px;
    border-radius: 10px; background: #001a45; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 16px 32px rgba(0, 10, 30, .45);
  }
  .oh:not(.is-compact) .oh-account.is-open .oh-account-menu { display: block; }
  .oh:not(.is-compact) .oh-account-menu a, .oh:not(.is-compact) .oh-account-menu button { min-height: 42px; font-size: 15px; white-space: nowrap; }
  /* .is-tight: the step before folding — less space between links, the account shown as its icon */
  .oh.is-tight .oh-bar { gap: 8px; }
  .oh.is-tight .oh-links { gap: 0; }
  .oh.is-tight .oh-link { padding: 0 8px; }
  .oh.is-tight .oh-who { display: none; }
}

.oh a:focus-visible, .oh button:focus-visible { outline: 2px solid #feb001; outline-offset: 2px; }
@media print { .oh { display: none !important; } }
