/* Shared responsive and theme fixes. Keep these rules after the page stylesheets. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:root:not([data-theme="dark"]) {
  --muted: #5d6d78 !important;
}

:root[data-theme="dark"] {
  --muted: #a0b7c3 !important;
}

.new-method:disabled,
.primary-button:disabled,
.primary-button:disabled:hover,
.primary-button:disabled:active {
  color: var(--muted) !important;
}

/* The desktop nav overlaps the header by design; its own surface created the
   floating rectangle seen at some zoom levels. On phones it stays flush with
   the full-width header instead. */
.shop-nav {
  box-sizing: border-box;
  flex-wrap: nowrap;
  background: transparent !important;
  box-shadow: none !important;
}

.shop-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  border-bottom-color: transparent !important;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.shop-nav a:hover {
  background: #f1f8fa;
  color: #087f9e;
}

.shop-nav a[aria-current="page"] {
  background: #e9f7fb !important;
  border-color: #c8e9f2 !important;
  color: #087f9e !important;
  font-weight: 600;
}

[data-theme="dark"] .shop-nav a:hover {
  background: #1a3440;
  color: #c5edf3;
}

[data-theme="dark"] .shop-nav a[aria-current="page"] {
  background: #193b47 !important;
  border-color: #356574 !important;
  color: #b9eaf1 !important;
}

[data-theme="dark"] .order-card {
  background: #162831 !important;
  border: 1px solid #2d424b !important;
  border-top: 1px solid #2d424b !important;
  background-image: none !important;
  color: #e8f0f3;
}

[data-theme="dark"] .order-card:hover {
  border-color: #45616c !important;
}

[data-theme="dark"] .order-filters button[aria-pressed="true"] {
  background: #203640;
  border-color: #3b5661;
  color: #b9eaf1;
}

@media (max-width: 800px) {
  .shop-nav {
    width: 100%;
    height: auto !important;
    min-height: 54px;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    align-items: center;
    justify-content: center;
    gap: 6px !important;
    background: var(--surface) !important;
    border-bottom: 1px solid var(--line);
    flex-wrap: nowrap;
  }

  .shop-nav a {
    white-space: nowrap;
  }

  #admin-nav {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .header-inner {
    flex-wrap: nowrap !important;
    gap: 4px !important;
    padding-inline: 8px !important;
  }

  .brand {
    gap: 2px !important;
    font-size: 16px !important;
  }

  .brand-planet {
    width: 25px !important;
    height: 25px !important;
  }

  .header-actions {
    gap: 3px !important;
  }

  .language-switch {
    gap: 0 !important;
    padding: 2px !important;
  }

  .language-switch a {
    padding: 4px 3px !important;
    font-size: 9px !important;
  }

  .currency-switch {
    gap: 0 !important;
    padding: 2px !important;
  }

  .currency-switch button {
    width: 22px !important;
    height: 26px !important;
    font-size: 14px !important;
  }

  #theme-toggle,
  .header-actions .login-button {
    flex-basis: 28px !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
  }

  .shop-nav {
    gap: 2px !important;
    padding-inline: 6px !important;
  }

  .shop-nav a {
    padding: 6px 6px !important;
    min-height: 34px;
    font-size: 11px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-nav a {
    transition: none;
  }
}
