/* a11y-perf.css */
/*
═══════════════════════════════════════════════════════════════════════════
  OMNET IT — Accessibility & Performance CSS additions
  File: a11y-perf.css
  Add as the LAST stylesheet on every page (after existing CSS).
  Purpose: improve WCAG 2.1 AA compliance, Core Web Vitals, and UX.
═══════════════════════════════════════════════════════════════════════════
*/

/* ── 1. Visible focus rings (WCAG 2.4.7) ─────────────────────────────── */
/* Browsers by default remove focus rings — that's an accessibility violation.
   This adds a high-contrast focus ring on all interactive elements. */
*:focus-visible {
  outline: 3px solid #0d9488;
  outline-offset: 2px;
  border-radius: 4px;
}
/* Hide the ring on mouse-clicked elements (but keep for keyboard users) */
*:focus:not(:focus-visible) { outline: none; }


/* ── 2. Reduced-motion preference (WCAG 2.3.3) ──────────────────────── */
/* Users who set "Reduce motion" in their OS get static experience. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ── 3. Skip-link visibility (WCAG 2.4.1) ───────────────────────────── */
/* Hidden until keyboard-focused, then visible at top-left. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #0f766e;
  color: #fff;
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 99999;
}
.skip-link:focus {
  left: 0;
  top: 0;
}


/* ── 4. Tap targets ≥ 44×44px (WCAG 2.5.5) ──────────────────────────── */
/* Apple HIG and Google MD both recommend 44px+ for touch. */
@media (max-width: 768px) {
  a.btn, button, .btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  /* Increase spacing on inline footer links to avoid mis-taps */
  footer a { padding: 6px 0; display: inline-block; }
}


/* ── 5. Image performance defaults ──────────────────────────────────── */
/* Prevents layout shift (CLS) when images load. */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
/* Hint for browsers to reserve space (use width/height attrs in HTML) */


/* ── 6. Prevent horizontal scroll on mobile ─────────────────────────── */
html, body { overflow-x: hidden; }


/* ── 7. Font rendering optimisations ────────────────────────────────── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* ── 8. Print stylesheet (small but improves UX) ────────────────────── */
@media print {
  .site-header, .site-footer, .omn-sticky-cta,
  .hero-cta, nav, .omn-link-cluster { display: none !important; }
  body { color: #000; background: #fff; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 90%; }
}


/* ── 9. Dark mode preference (basic) ────────────────────────────────── */
/* Optional: respects user's OS dark-mode preference. */
@media (prefers-color-scheme: dark) {
  /* Only apply if you've designed for dark mode.
     Comment out this block until you have dark-mode design tokens. */
  /* :root {
    --bg: #111827;
    --text: #e5e7eb;
  } */
}


/* ── 10. Selection colour ───────────────────────────────────────────── */
::selection {
  background: #0d9488;
  color: #fff;
}


/* ── 11. Form input accessibility ───────────────────────────────────── */
input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #dc2626;
}
input:valid:not(:focus):not(:placeholder-shown) {
  border-color: #16a34a;
}
label { cursor: pointer; }


/* ── 12. Reduce CSS bloat note ──────────────────────────────────────── */
/* You currently load 5 stylesheets:
     style.css, design-system.css, layout-fixes.css,
     responsive-design.css, mobile-fixes.css
   Plus this one would be 6. Long-term: consolidate to 2 max:
     1. critical.css (above-the-fold, inline in <head>)
     2. main.css (everything else, loaded async)
   See AUDIT-FINDINGS.md §5 for the consolidation plan. */


/* ═══════════════════════════════════════════════════════════════════════
   FIX: Hide the existing site sticky-call bar on desktop
   The site's HTML has <div class="omnet-sticky-bar"> but its hiding CSS
   lives in mobile-redesign.css and omnet-improvements.css which are NOT
   loaded on most pages — so the bar leaked onto desktop.
   ═══════════════════════════════════════════════════════════════════════ */
.omnet-sticky-bar {
  display: none !important;
}
@media (max-width: 768px) {
  .omnet-sticky-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9300 !important;
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  .omnet-sticky-bar .omnet-sticky-phone {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    background: #f0fdfa !important;
    color: #0d9488 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
  }
  .omnet-sticky-bar .omnet-sticky-call {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: #0d9488 !important;
    color: #ffffff !important;
    padding: 10px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    min-height: 44px !important;
  }
  .omnet-sticky-bar .omnet-sticky-wa {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    background: #25D366 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
  }
  body { padding-bottom: 64px !important; }
}

/* i18n.css */
/* ════════════════════════════════════════════════════════════════════
   OMNET IT — Multilingual (i18n) UI
   Language switcher + browser-language suggestion banner + RTL support.
   Harmonised with the existing teal design system (style.css :root vars).
   ════════════════════════════════════════════════════════════════════ */

/* ---------- Language switcher (desktop, lives in .header-cta) ---------- */
.omnet-lang {
  position: relative;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.omnet-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-50, #f0fdfa);
  color: var(--teal-700, #0f766e);
  border: 1px solid var(--teal-200, #99f6e4);
  border-radius: 50px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.omnet-lang-btn:hover,
.omnet-lang-btn[aria-expanded="true"] {
  background: var(--teal-100, #ccfbf1);
  border-color: var(--teal-400, #2dd4bf);
  color: var(--teal-800, #115e59);
}
.omnet-lang-btn i.ri-global-line { font-size: 16px; }
.omnet-lang-btn .omnet-lang-caret {
  font-size: 14px;
  transition: transform .15s ease;
}
.omnet-lang-btn[aria-expanded="true"] .omnet-lang-caret { transform: rotate(180deg); }
.omnet-lang-current { font-weight: 700; }

/* ---------- Dropdown panel ---------- */
.omnet-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 118, 110, .14), 0 2px 8px rgba(0,0,0,.06);
  padding: 6px;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.omnet-lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.omnet-lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 14px;
  color: var(--gray-700, #374151);
  cursor: pointer;
  font-family: inherit;
  transition: background .12s ease, color .12s ease;
}
.omnet-lang-menu button:hover,
.omnet-lang-menu button:focus-visible {
  background: var(--teal-50, #f0fdfa);
  color: var(--teal-700, #0f766e);
  outline: none;
}
.omnet-lang-menu button[aria-current="true"] {
  background: var(--teal-100, #ccfbf1);
  color: var(--teal-800, #115e59);
  font-weight: 700;
}
.omnet-lang-menu button[aria-current="true"]::after {
  content: "\2713"; /* check */
  margin-left: auto;
  font-weight: 700;
  color: var(--teal-600, #0d9488);
}
.omnet-lang-flag {
  font-size: 18px;
  line-height: 1;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.omnet-lang-native { font-weight: 600; }
.omnet-lang-en {
  margin-left: 4px;
  font-size: 12px;
  color: var(--gray-400, #9ca3af);
}

/* ---------- Mobile switcher (lives inside .mobile-nav-inner) ---------- */
.omnet-lang-mobile {
  margin-top: .25rem;
  margin-bottom: .25rem;
}
.omnet-lang-mobile .omnet-lang-mobile-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal-600, #0d9488);
  padding: .35rem .25rem;
}
.omnet-lang-mobile select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--teal-50, #f0fdfa) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--teal-200, #99f6e4);
  border-radius: 10px;
  padding: 12px 38px 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal-800, #115e59);
  font-family: inherit;
  cursor: pointer;
}
.omnet-lang-mobile select:focus-visible {
  outline: 2px solid var(--teal-400, #2dd4bf);
  outline-offset: 2px;
}

/* ---------- Browser-language suggestion banner ---------- */
.omnet-lang-suggest {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 140%);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  max-width: min(560px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--teal-200, #99f6e4);
  border-left: 4px solid var(--teal-500, #14b8a6);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 118, 110, .18), 0 4px 12px rgba(0,0,0,.08);
  padding: 14px 16px;
  opacity: 0;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s ease;
}
.omnet-lang-suggest.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.omnet-lang-suggest .omnet-suggest-icon {
  font-size: 22px;
  color: var(--teal-600, #0d9488);
  flex-shrink: 0;
}
.omnet-lang-suggest .omnet-suggest-text {
  font-size: 14px;
  color: var(--gray-700, #374151);
  flex: 1 1 220px;
  min-width: 180px;
}
.omnet-lang-suggest .omnet-suggest-text strong { color: var(--teal-700, #0f766e); }
.omnet-lang-suggest .omnet-suggest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.omnet-suggest-yes {
  background: linear-gradient(135deg, var(--teal-500, #14b8a6), var(--cyan-600, #0891b2));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.omnet-suggest-yes:hover { filter: brightness(1.06); }
.omnet-suggest-no {
  background: none;
  border: none;
  color: var(--gray-500, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 6px;
  font-family: inherit;
}
.omnet-suggest-no:hover { color: var(--gray-700, #374151); }

/* ---------- Optional "translate full page content" bridge bar ---------- */
.omnet-content-note {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--teal-50, #f0fdfa);
  border-bottom: 1px solid var(--teal-200, #99f6e4);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--teal-800, #115e59);
  text-align: center;
}
.omnet-content-note.show { display: flex; }
.omnet-content-note button {
  background: var(--teal-600, #0d9488);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.omnet-content-note button:hover { background: var(--teal-700, #0f766e); }
.omnet-content-note .omnet-content-dismiss {
  background: none;
  color: var(--teal-700, #0f766e);
  padding: 6px 8px;
}

/* ---------- RTL support (Arabic, Urdu) ---------- */
html[dir="rtl"] .header-inner,
html[dir="rtl"] .header-nav-bar-inner,
html[dir="rtl"] .footer-main { direction: rtl; }
html[dir="rtl"] .omnet-lang-menu { right: auto; left: 0; }
html[dir="rtl"] .omnet-lang-menu button { text-align: right; }
html[dir="rtl"] .omnet-lang-menu button[aria-current="true"]::after { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .omnet-lang-en { margin-left: 0; margin-right: 4px; }
html[dir="rtl"] .omnet-lang-suggest { border-left: 1px solid var(--teal-200,#99f6e4); border-right: 4px solid var(--teal-500,#14b8a6); }
/* Keep Latin brand marks LTR even inside an RTL page */
html[dir="rtl"] .logo-name,
html[dir="rtl"] .logo-tagline,
html[dir="rtl"] [data-i18n-keep-ltr],
html[dir="rtl"] .header-phone { direction: ltr; unicode-bidi: embed; }

/* ---------- Hide Google Translate's default chrome (we drive it ourselves) ---------- */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
#goog-gt-tt,
.goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
body { top: 0 !important; } /* Google pushes body down with a banner; cancel it */
#omnet-google-translate { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .omnet-lang-menu, .omnet-lang-suggest, .omnet-lang-btn .omnet-lang-caret { transition: none; }
}
