/* ==========================================================================
   Clock & Coffee: ortaq naviqasiya (yuxarı menyu + mobil alt panel)
   Ana sayt (index.html) və bütün alt səhifələr (/hesab, /ofisiant) eyni faylı işlədir.
   Alt səhifələrdə markup assets/js/site-chrome.js ilə ana səhifədən götürülür:
   naviqasiyanın tək mənbəyi index.html-dir.
   ========================================================================== */
:root {
  --green-950: #081b12;
  --green-900: #0e2a1d;
  --green-800: #133524;
  --green-700: #1c4631;
  --green-600: #28613f;
  --cream-100: #f4ecdb;
  --lime: #d5f05a;
  --on-dark-muted: rgba(244, 236, 219, 0.7);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Kaushan Script', 'Fraunces', cursive;
  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 76px;
}

/* Bootstrap/Vuexy olan səhifələrdə də eyni görünsün: onların .nav, a, button, svg qaydalarını sıfırlayırıq */
.nav, .mnav, .tabbar { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
.nav { flex-wrap: nowrap; margin: 0; list-style: none; font-family: var(--font-sans); line-height: 1.6; }
/* :where() özgüllüyü sıfırdır: tabbar/menyunun öz rəng qaydaları (məs. VIP-in laym rəngi) üstün qalır */
:where(.nav, .mnav, .tabbar) a { color: inherit; text-decoration: none; }
:where(.nav) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.nav, .mnav, .tabbar) :is(img, svg) { display: block; max-width: 100%; vertical-align: initial; }
.nav .icon, .mnav .icon { width: 1.15em; height: 1.15em; flex: none; }
.nav__brand .logo-ink { filter: url(#ink-cream); object-fit: contain; }
.nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0.75em 1.25em;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green-950) !important;
  font: 700 0.88rem/1 var(--font-sans);
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(213, 240, 90, 0.55);
  transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.nav__cta:hover { background: #e4ff75; box-shadow: 0 16px 40px -12px rgba(213, 240, 90, 0.7); }
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  70%, 100% { transform: scale(4); opacity: 0; }
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  color: var(--cream-100);
  transition: transform 0.5s var(--ease-out), color 0.35s, background-color 0.35s, box-shadow 0.35s;
}
.nav::before {
  content: '';
  position: absolute;
  inset: 10px calc(var(--gutter) - 14px);
  z-index: -1;
  border-radius: 999px;
  background: rgba(8, 27, 18, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  opacity: 0;
  transition: opacity 0.35s, background-color 0.35s;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-light { color: var(--green-900); }
.nav.is-light::before { background: rgba(244, 236, 219, 0.72); }
.nav.is-hidden { transform: translateY(-110%); }
.nav.is-open { color: var(--cream-100); }
.nav.is-open::before { opacity: 0; }
.nav.is-open .nav__brand .logo-ink { filter: url(#ink-cream); }
.nav.is-open .nav__word em { color: var(--lime); }
.nav__brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.nav__brand .logo-ink { width: 46px; height: 46px; }
.nav.is-light .nav__brand .logo-ink { filter: url(#ink-green); }
.nav__word { font: 600 1.25rem/1 var(--font-display); letter-spacing: -0.01em; }
.nav__word em { font-family: var(--font-script); font-style: normal; color: var(--lime); margin: 0 1px; }
.nav.is-light .nav__word em { color: var(--green-600); }
.nav__links { display: flex; gap: 4px; }
/* VIP və profil (kabinetə keçid) */
.nav__vip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  font: 700 0.875rem/1 var(--font-sans);
  letter-spacing: 0.04em;
  color: var(--lime);
  box-shadow: inset 0 0 0 1.5px rgba(213, 240, 90, 0.55);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.nav__vip:hover { background: var(--lime); color: var(--green-950); box-shadow: 0 10px 26px -12px rgba(213, 240, 90, 0.8); }
.nav__profile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(244, 236, 219, 0.35); transition: background-color 0.3s var(--ease-out); }
.nav__profile:hover { background: rgba(244, 236, 219, 0.12); }
.nav__profile .icon { width: 20px; height: 20px; }
.nav.is-light .nav__vip { color: var(--green-900); box-shadow: inset 0 0 0 1.5px rgba(14, 42, 29, 0.35); }
.nav.is-light .nav__vip:hover { background: var(--green-900); color: var(--lime); }
.nav.is-light .nav__profile { box-shadow: inset 0 0 0 1.5px rgba(14, 42, 29, 0.3); }
.nav__links a {
  position: relative;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.93rem;
  border-radius: 999px;
  transition: background-color 0.25s;
}
.nav__links a:hover { background: rgba(244, 236, 219, 0.1); }
.nav.is-light .nav__links a:hover { background: rgba(14, 42, 29, 0.08); }
.nav__links a.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--lime);
}
.nav.is-light .nav__links a.is-active::after { background: var(--green-600); }
.nav__burger { display: none; width: 48px; height: 48px; border-radius: 50%; position: relative; }
.nav__burger span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.nav__burger span:first-child { top: 19px; }
.nav__burger span:last-child { top: 27px; }
.nav__burger[aria-expanded='true'] span:first-child { top: 23px; transform: rotate(45deg); }
.nav__burger[aria-expanded='true'] span:last-child { top: 23px; transform: rotate(-45deg); }

.mnav {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 40px;
  background: var(--green-950);
  color: var(--cream-100);
  clip-path: circle(0% at calc(100% - 44px) 38px);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s 0.7s;
}
.mnav.is-open { clip-path: circle(150% at calc(100% - 44px) 38px); visibility: visible; transition: clip-path 0.7s var(--ease-in-out); }
.mnav nav { display: grid; gap: 6px; }
.mnav nav a { font: 600 clamp(2.4rem, 11vw, 3.6rem)/1.15 var(--font-display); }
.mnav nav a:active { color: var(--lime); }
.mnav__foot { display: grid; gap: 8px; color: var(--on-dark-muted); font-weight: 600; }

/* ==========================================================================
   Mobil alt naviqasiya: liquid glass
   ========================================================================== */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar {
    position: fixed;
    z-index: 95;
    left: 50%;
    bottom: calc(12px + var(--sab));
    translate: -50% 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    width: min(calc(100vw - 20px), 440px);
    height: 72px;
    padding: 6px;
    border-radius: 30px;
    isolation: isolate;
    color: var(--cream-100);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04) 42%, rgba(255, 255, 255, 0.1)),
      rgba(9, 30, 20, 0.34);
    -webkit-backdrop-filter: blur(16px) saturate(190%) brightness(1.05);
    backdrop-filter: blur(16px) saturate(190%) brightness(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -1px 0 rgba(255, 255, 255, 0.1),
      inset 0 0 22px rgba(255, 255, 255, 0.06),
      0 22px 44px -18px rgba(0, 0, 0, 0.65),
      0 3px 8px rgba(0, 0, 0, 0.16);
  }
  /* Chromium: arxa fon şüşə kimi sınır (refraksiya); dəstəkləməyən brauzer yuxarıdakı blur-u saxlayır */
  .is-chromium .tabbar { backdrop-filter: url(#lg-refract) blur(14px) saturate(190%) brightness(1.05); }
  /* işıq əksi (specular highlight) */
  .tabbar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background:
      radial-gradient(90% 55% at 22% -10%, rgba(255, 255, 255, 0.42), transparent 62%),
      radial-gradient(60% 50% at 88% 120%, rgba(213, 240, 90, 0.18), transparent 70%);
    pointer-events: none;
  }
  /* parıldayan kənar: gradient halqanın içində fırlanır (transform, GPU; paneli yenidən çəkmir) */
  .tabbar__rim {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.2px;
    overflow: hidden;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
  }
  .tabbar__rim::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 104%;
    aspect-ratio: 1;
    translate: -50% -50%;
    background: conic-gradient(from 120deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.06) 22%, rgba(213, 240, 90, 0.55) 48%, rgba(255, 255, 255, 0.08) 70%, rgba(255, 255, 255, 0.75));
    animation: rim-spin 9s linear infinite;
    will-change: transform;
  }
  @keyframes rim-spin { to { transform: rotate(360deg); } }

  /* aktiv tabın altındakı "maye damla" */
  .tabbar__blob {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: calc(100% / 6);
    z-index: 0;
    border-radius: 24px;
    background: radial-gradient(140% 120% at 28% 0%, rgba(255, 255, 255, 0.7), rgba(236, 255, 140, 0.96) 36%, #c3e043 100%);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.95),
      inset 0 -3px 8px rgba(90, 110, 0, 0.35),
      0 10px 22px -8px rgba(213, 240, 90, 0.7);
    will-change: transform, width;
  }
  .tabbar__item {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    border-radius: 24px;
    color: rgba(244, 236, 219, 0.8);
    font: 700 10.5px/1 var(--font-sans);
    letter-spacing: 0.03em;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.3s var(--ease-out);
  }
  .tabbar__item.is-active { color: var(--green-950); }
  .tabbar__item:focus-visible { outline-offset: -4px; }
  .tabbar__icon { position: relative; display: grid; place-items: center; width: 26px; height: 26px; }
  .tabbar__icon svg {
    position: absolute;
    width: 25px;
    height: 24px;
    transition: opacity 0.25s var(--ease-out), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .tabbar__icon .i-b { opacity: 0; transform: scale(0.5) rotate(-12deg); }
  .tabbar__item.is-active .i-b { opacity: 1; transform: none; }
  .tabbar__item.is-active .i-l { opacity: 0; transform: scale(1.4); }
  .tabbar__label { white-space: nowrap; }
  .tabbar__item--wa .tabbar__icon::before,
  .tabbar__item--wa .tabbar__icon::after {
    content: '';
    position: absolute;
    z-index: 1;
    top: 0;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
  }
  .tabbar__item--wa .tabbar__icon::before { opacity: 0.6; animation: pulse 2s infinite; }

  /* alt panel olduğu üçün yuxarıdakı burger, WhatsApp və proqres saatı lazım deyil */
  .nav__burger, .nav__cta, .nav__vip, .nav__profile { display: none !important; }
  /* VIP: laym nöqtə ilə seçilir */
  .tabbar__item--vip { color: var(--lime); }
  .tabbar__item--vip .tabbar__icon::after { content: ''; position: absolute; top: -1px; right: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px rgba(9, 30, 20, 0.6); }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .tabbar__rim::before { animation: none; }
}

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
}
@media (max-width: 900px) {
  :root { --nav-h: 68px; }
}
@media (max-width: 640px) {
  .nav__cta span { display: none; }
  .nav__cta { min-height: 44px; width: 44px; padding: 0; }
  .nav__word { font-size: 1.1rem; }
}

/* ---------- alt səhifələr (kabinet, ofisiant): hansı bölmədə olduğumuz ---------- */
.tabbar__item.is-current { color: var(--green-950); }
.nav__vip[aria-current='page'] { background: var(--lime); color: var(--green-950); }
.nav.is-light .nav__vip[aria-current='page'] { background: var(--green-900); color: var(--lime); }
.nav__profile[aria-current='page'] { background: var(--lime); color: var(--green-950); box-shadow: none; }
.nav.is-light .nav__profile[aria-current='page'] { background: var(--green-900); color: var(--lime); }
.tabbar__blob.is-empty { opacity: 0; }

/* sensor ekranda mətn yazılarkən (klaviatura açıq) alt panel gizlənir: formu örtməsin */
@media (hover: none) {
  .is-typing .tabbar { display: none !important; }
}

/* Mobil tətbiq (Android edge-to-edge, iOS çentik): menyu status panelinin altına düşməsin.
   Capacitor --safe-area-inset-* dəyişənlərini verir; vebdə env() işləyir, adi brauzerdə 0-dır. */
:root {
  --sat: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sab: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}
.nav { box-sizing: border-box; height: calc(var(--nav-h) + var(--sat)); padding-top: var(--sat); }
.nav::before { top: calc(10px + var(--sat)); }
.mnav { padding-top: calc(var(--nav-h) + var(--sat) + 24px); padding-bottom: calc(40px + var(--sab)); }

/* ---------- dil seçimi (AZ / RU / EN) ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.langswitch { position: relative; display: inline-flex; flex: none; align-items: center; }
.langswitch select {
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  padding: 0 28px 0 12px;
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(244, 236, 219, 0.35);
  background: transparent;
  color: inherit;
  font: 700 0.82rem/1 var(--font-sans, inherit);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.langswitch::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  opacity: 0.75;
}
.langswitch select:focus-visible { outline: 2px solid var(--lime, #d5f05a); outline-offset: 2px; }
.langswitch option { color: #0e2a1d; background: #fff; }
.nav.is-light .langswitch select { box-shadow: inset 0 0 0 1.5px rgba(14, 42, 29, 0.3); }
@media (max-width: 900px) {
  .langswitch select { height: 36px; padding: 0 24px 0 10px; font-size: 0.78rem; }
  .langswitch::after { right: 10px; }
}

/* ==========================================================================
   Filial seçimi dialoq pəncərəsi (Action Sheet / Modal)
   ========================================================================== */
button.tabbar__item {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.branch-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.branch-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.branch-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 15, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.branch-modal__sheet {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 16px), 440px);
  margin-bottom: calc(12px + var(--sab));
  border-radius: 28px;
  padding: 20px 20px 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04) 42%, rgba(255, 255, 255, 0.08)),
    #0e2a1d;
  color: var(--cream-100, #fbf8f1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 24px rgba(255, 255, 255, 0.04),
    0 24px 60px -10px rgba(0, 0, 0, 0.7);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.branch-modal.is-open .branch-modal__sheet {
  transform: translateY(0) scale(1);
}
.branch-modal__handle {
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 auto -4px;
}
.branch-modal__header {
  text-align: center;
}
.branch-modal__title {
  font: 800 1.25rem/1.2 var(--font-sans, sans-serif);
  color: var(--lime, #d5f05a);
  margin: 0 0 6px;
}
.branch-modal__desc {
  font-size: 0.88rem;
  color: rgba(244, 236, 219, 0.75);
  margin: 0;
  line-height: 1.35;
}
.branch-modal__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.branch-modal__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.branch-modal__btn:hover,
.branch-modal__btn:active {
  background: rgba(213, 240, 90, 0.15);
  box-shadow: inset 0 0 0 1.5px var(--lime, #d5f05a);
  transform: scale(0.99);
}
.branch-modal__btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.branch-modal__btn-icon .icon {
  width: 22px;
  height: 22px;
}
.branch-modal__btn-content {
  flex: 1;
  min-width: 0;
}
.branch-modal__btn-content strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.branch-modal__btn-content small {
  display: block;
  font-size: 0.78rem;
  color: rgba(244, 236, 219, 0.65);
}
.branch-modal__btn-arrow {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}
.branch-modal__btn:hover .branch-modal__btn-arrow {
  color: var(--lime, #d5f05a);
}
.branch-modal__close-btn {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 236, 219, 0.8);
  font: 700 0.9rem/1 var(--font-sans, sans-serif);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.branch-modal__close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
