#site-app-switcher {
  --switch-bg: #f4f6f1;
  --switch-text: #23342c;
  --switch-border: #e1e8df;
  --switch-pill: #fff;
  --switch-pill-border: #dce5db;
  --switch-pill-hover: #eaf2e8;
  --switch-active: #2b584a;
  --switch-active-text: #fff;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  padding: 7px 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-bottom: 1px solid var(--switch-border);
  background: var(--switch-bg);
  color: var(--switch-text);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#site-app-switcher::-webkit-scrollbar { display: none; }

#site-app-switcher .site-app-switcher-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--switch-pill-border);
  border-radius: 999px;
  background: var(--switch-pill);
  color: var(--switch-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}

#site-app-switcher .site-app-switcher-link:hover {
  border-color: var(--switch-active);
  background: var(--switch-pill-hover);
  color: var(--switch-active);
}

#site-app-switcher .site-app-switcher-link:focus-visible {
  outline: 3px solid var(--switch-active);
  outline-offset: 2px;
}

#site-app-switcher .site-app-switcher-link.is-current {
  border-color: var(--switch-active);
  background: var(--switch-active);
  color: var(--switch-active-text);
}

body[data-app-switcher="pdf"] #site-app-switcher {
  --switch-bg: #f6f8f2;
  --switch-active: #153d31;
  --switch-pill-hover: #e8f0e4;
}

body[data-app-switcher="tractor"] #site-app-switcher {
  --switch-bg: #f3f6ef;
  --switch-active: #466b35;
  --switch-pill-hover: #e8efdf;
}

body[data-app-switcher="teksovira"] #site-app-switcher {
  --switch-bg: #f4f6f1;
  --switch-active: #2b584a;
  --switch-pill-hover: #eaf2e8;
  width: calc(100% - 236px);
  margin-inline-start: 236px;
}

body[data-app-switcher="save"] #site-app-switcher {
  --switch-bg: #f4f8fc;
  --switch-border: #e0eaf3;
  --switch-pill-border: #dce7f1;
  --switch-pill-hover: #eaf3fc;
  --switch-active: #176ce0;
}

body[data-app-switcher="chronos"] #site-app-switcher {
  --switch-bg: #090d1c;
  --switch-text: #e7edff;
  --switch-border: rgba(179, 200, 255, .14);
  --switch-pill: #11182b;
  --switch-pill-border: rgba(179, 200, 255, .17);
  --switch-pill-hover: #1b2540;
  --switch-active: #6557dc;
  --switch-active-text: #fff;
}

@media (max-width: 700px) {
  #site-app-switcher {
    justify-content: flex-start;
    gap: 6px;
    min-height: 46px;
    padding: 6px 12px;
  }

  #site-app-switcher .site-app-switcher-link {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11px;
  }
}

@media (max-width: 800px) {
  body[data-app-switcher="teksovira"] #site-app-switcher {
    width: calc(100% - 215px);
    margin-inline-start: 215px;
  }
}

@media (max-width: 620px) {
  body[data-app-switcher="teksovira"] #site-app-switcher {
    width: 100%;
    margin-inline-start: 0;
  }
}

@media (max-width: 380px) {
  #site-app-switcher { gap: 5px; padding-inline: 9px; }
  #site-app-switcher .site-app-switcher-link { padding-inline: 9px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #site-app-switcher .site-app-switcher-link { transition: none; }
}
