/* ============================================================================
   UCA theme — OPTIONAL one-row header (owner mockup 2026-11-28), OFF by default.

   Every rule is scoped under html.uca-hdr-oneline, so with the option off this
   file changes nothing and the two-row header is exactly as before.

   The switch (one place, the theme's own "Custom head code", tbl_Themes.CustomHeadCode,
   which the builder already emits in <head> of every page):
       <script>window.UCA_HEADER={layout:'oneline',
         apply:{ar:'قدّم الآن',en:'Apply now'},applyUrl:'/registration'};
         document.documentElement.classList.add('uca-hdr-oneline');</script>
   Remove the snippet = the current header again. assets/js/uca-header-oneline.js
   adds the «قدّم الآن» button and the school name beside the logo (labels from the
   snippet, so they are data, not code).

   Row: logo + school name (start) · menu (middle, current item underlined in
   green) · compact language / dark mode / admin icons · orange «قدّم الآن» (end).
   The contact strip (phone, e-book button, social) leaves the header: the phone
   and address stay in the footer and the contact page.
   ============================================================================ */

html.uca-hdr-oneline .uca-header { border-bottom: 1px solid rgba(21, 128, 61, .14); box-shadow: 0 2px 14px rgba(20, 83, 45, .08); }
html.uca-hdr-oneline .uca-header-inner { display: flex; align-items: center; gap: 14px; min-height: 76px; width: min(1240px, 100% - 32px); }
html.uca-hdr-oneline .uca-header .info-bar { display: contents; }               /* its children join the row */
html.uca-hdr-oneline .uca-header .info-bar-contact,
html.uca-hdr-oneline .uca-header .info-bar-actions .header-cta,
html.uca-hdr-oneline .uca-header .info-bar-social,
html.uca-hdr-oneline .uca-header .bottom-separator { display: none !important; }

/* start: logo + name */
html.uca-hdr-oneline .uca-header .info-bar-logo { order: 1; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; text-decoration: none; }
html.uca-hdr-oneline .uca-header .info-bar-logo img { height: 52px; width: auto; }
html.uca-hdr-oneline .uca-hdr-name { display: flex; flex-direction: column; line-height: 1.2; }
html.uca-hdr-oneline .uca-hdr-name b { color: #14532D; font-size: 15px; font-weight: 700; white-space: nowrap; }
html.uca-hdr-oneline .uca-hdr-name small { color: #15803D; font-size: 11px; white-space: nowrap; }

/* middle: the menu */
html.uca-hdr-oneline .uca-nav { order: 2; flex: 1 1 auto; min-width: 0; padding: 0; }
html.uca-hdr-oneline .uca-menu { flex-wrap: nowrap; justify-content: center; gap: 0; }
html.uca-hdr-oneline .uca-menu > li > a { padding: 26px 10px 24px; font-size: 14.5px; border-radius: 0; white-space: nowrap; }
html.uca-hdr-oneline .uca-menu > li > a:hover, html.uca-hdr-oneline .uca-menu > li > a:focus-visible { background: none; color: #15803D; }
html.uca-hdr-oneline .uca-menu > li.active > a, html.uca-hdr-oneline .uca-menu > li.current > a,
html.uca-hdr-oneline .uca-menu > li > a[aria-current="page"] { color: #15803D; box-shadow: inset 0 -3px 0 #15803D; }

/* end: compact icons, then the call to action */
html.uca-hdr-oneline .uca-header .info-bar-actions { order: 3; display: flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 0; margin: 0; border: 0; }
html.uca-hdr-oneline .uca-header .info-bar-actions > .theme-toggle-btn,
html.uca-hdr-oneline .uca-header .info-bar-actions .lang-dropdown-toggle,
html.uca-hdr-oneline .uca-header .info-bar-actions .admin-link { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 4px; font-size: 13px; }
html.uca-hdr-oneline .uca-header .info-bar-actions .admin-link span { display: none; }      /* lock icon only; title keeps the name */
html.uca-hdr-oneline .uca-hdr-apply { order: 4; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px;
  background: #F97316; color: #fff !important; border-radius: 4px; font-weight: 700; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
html.uca-hdr-oneline .uca-hdr-apply:hover, html.uca-hdr-oneline .uca-hdr-apply:focus-visible { background: #EA580C; }

/* narrower desktops: drop the name's second line first, then the name */
@media (max-width: 1280px) { html.uca-hdr-oneline .uca-hdr-name small { display: none; } html.uca-hdr-oneline .uca-menu > li > a { padding-inline: 8px; font-size: 14px; } }
@media (max-width: 1140px) { html.uca-hdr-oneline .uca-hdr-name { display: none; } }

/* phone / tablet (a1-nav.js collapses the menu below 992px and inserts its own button before the nav) */
@media (max-width: 991.98px) {
  html.uca-hdr-oneline .uca-header-inner { flex-wrap: wrap; gap: 8px 10px; min-height: 0; padding: 8px 0; }
  html.uca-hdr-oneline .uca-header .info-bar-logo { order: 1; margin-inline-end: auto; }
  html.uca-hdr-oneline .uca-header .info-bar-logo img { height: 44px; }
  html.uca-hdr-oneline .uca-hdr-name { display: none; }
  html.uca-hdr-oneline .uca-hdr-apply { order: 2; height: 38px; padding: 0 14px; font-size: 14px; }
  html.uca-hdr-oneline .a1-nav-toggle { order: 3; }
  html.uca-hdr-oneline .uca-header .info-bar-actions { order: 4; flex: 1 0 100%; justify-content: flex-end; }
  html.uca-hdr-oneline .uca-nav { order: 5; flex: 1 0 100%; }
  html.uca-hdr-oneline .uca-menu { flex-wrap: wrap; justify-content: flex-start; }
  html.uca-hdr-oneline .uca-menu > li > a { padding: 10px 12px; }
}
@media (max-width: 420px) {
  html.uca-hdr-oneline .a1-nav-toggle .a1-nav-toggle-text { display: none; }   /* bars only, room for logo + button */
}

/* dark mode */
html.uca-hdr-oneline.dark-mode .uca-hdr-name b { color: #E5E7EB; }
html.uca-hdr-oneline.dark-mode .uca-hdr-name small { color: #86EFAC; }
html.uca-hdr-oneline.dark-mode .uca-menu > li.active > a, html.uca-hdr-oneline.dark-mode .uca-menu > li > a[aria-current="page"] { color: #86EFAC; box-shadow: inset 0 -3px 0 #86EFAC; }

/* footer: the e-book and social links that left the header, as clear labelled links (added by the script, only in this layout) */
html.uca-hdr-oneline .uca-ft-links { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
html.uca-hdr-oneline .uca-ft-links a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; text-decoration: none; }
html.uca-hdr-oneline .uca-ft-links a:hover, html.uca-hdr-oneline .uca-ft-links a:focus-visible { color: #F97316; text-decoration: underline; }
html.uca-hdr-oneline .uca-ft-links i { width: 18px; text-align: center; color: #F97316; }
