/* ==========================================================================
   Top bar above the main header (includes/header.php) - all public pages.
   In normal page flow above the fixed navbar; the navbar is pushed down by
   the bar's height and slides up as the bar scrolls away (script in header.php).
   Theme values: #5270FF, Poppins.
   ========================================================================== */

:root { --topbar-h: 46px; }

.topbar {
  position: relative;
  z-index: 1031;               /* above the fixed navbar (1030) while visible */
  height: var(--topbar-h);
  background: #10164a;         /* dark indigo built from the theme colour */
  color: #dfe5ff;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
}
/* Full width: contact details on the far left, phone + track order on the far right */
.topbar .container {
  max-width: none;
  width: 100%;
  padding-left: 32px;
  padding-right: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}
.topbar-group {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.topbar-group:last-child { margin-left: auto; }

/* Left items (address, email) line up with the logo / page .container;
   right items (phone, track order) stay at the far right of the screen. */
@media (min-width: 1200px) {
  .topbar .container { padding-left: max(32px, calc((100% - 1140px) / 2 + 15px)); }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .topbar .container { padding-left: max(20px, calc((100% - 960px) / 2 + 15px)) !important; }
}
.topbar a,
.topbar span.tb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dfe5ff;
  text-decoration: none;
  letter-spacing: .2px;
  transition: color .2s ease;
}
.topbar a:hover,
.topbar a:focus-visible { color: #fff; text-decoration: none; }
.topbar a:focus-visible { outline: 2px solid #C8D6FA; outline-offset: 2px; border-radius: 3px; }
.topbar svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: #8fa3ff;
}
.topbar .tb-sep {
  width: 1px;
  height: 18px;
  background: rgba(223, 229, 255, 0.22);
}
.topbar .tb-slash { color: rgba(223, 229, 255, 0.45); margin: 0 -6px; }
.topbar .tb-motto { color: #C8D6FA; font-style: italic; }
.topbar .tb-track {
  height: 30px;
  padding: 0 16px;
  border-radius: 15px;
  background: #5270FF;
  color: #fff !important;
  font-weight: 600;
  margin-left: 6px;
}
.topbar .tb-track svg { fill: #fff; }
.topbar .tb-track:hover { background: #3d58e6; }

/* Fixed navbar sits below the bar; header.php JS moves it up as the bar scrolls away */
.scrolling-navbar.fixed-top { top: var(--topbar-offset, var(--topbar-h)); }
.scrolling-navbar.fixed-top.top-nav-collapse { top: 0 !important; }

/* ---- Responsive: keep one line, drop the least important items first ---- */
@media (max-width: 1199px) {
  .topbar span.tb-item.tb-motto, .topbar .tb-motto + .tb-sep { display: none; }
  .topbar .container { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 991px) {
  .topbar .tb-address, .topbar .tb-address + .tb-sep { display: none; }
  .topbar .tb-phone2, .topbar .tb-slash { display: none; }
}
@media (max-width: 767px) {
  .topbar .tb-email { display: none; }
  .topbar .topbar-group:first-child { display: none; }   /* nothing left in it on phones */
  .topbar .container { justify-content: center; }
  .topbar-group:last-child { margin-left: 0; }
}
@media (max-width: 575px) {
  :root { --topbar-h: 42px; }
  .topbar { font-size: 12.5px; }
  .topbar .container { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .topbar-group { gap: 10px; }
  .topbar .tb-track { height: 28px; padding: 0 12px; }
}
