:root {
  --site-topbar-height: 52px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  height: var(--site-topbar-height);
  padding: 8px clamp(10px, 2.2vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 15, 30, 0.68);
  backdrop-filter: blur(8px);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: auto;
}

.topbar__brand {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.site-brand-logo {
  display: block;
  width: min(245px, 38vw);
  max-height: 36px;
  object-fit: contain;
  object-position: left center;
}

.topbar__actions,
.topbar__nav {
  display: flex;
  align-items: center;
}

.topbar__actions {
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.topbar__nav {
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar__nav::-webkit-scrollbar {
  display: none;
}

.topbar__nav a,
.topbar__cart {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  font: inherit;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible,
.topbar__nav a.is-active,
.topbar__cart.is-active,
.topbar__cart:hover,
.topbar__cart:focus-visible {
  border-color: rgba(255, 232, 176, 0.22);
  color: #ffe8b0;
  outline: none;
}

.topbar__cart {
  appearance: none;
  -webkit-appearance: none;
}

.topbar-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.50);
  color: #fff;
  font-size: 14px;
}

.topbar-lang__label {
  opacity: .9;
  font-weight: 600;
  letter-spacing: .03em;
}

.topbar-lang select {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  min-width: 58px;
  padding: 4px 24px 4px 9px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background-color: rgba(8,18,34,0.84);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.86) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.86) 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 52%,
    calc(100% - 7px) 52%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: #fff;
  font: inherit;
}

.topbar-lang select option {
  background: #081222;
  color: #fff;
}

.topbar-account {
  position: relative;
  flex: 0 0 auto;
}

.topbar-account__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(0,0,0,.38);
  color: rgba(255,255,255,0.82);
  font: inherit;
  line-height: 1;
}

.topbar-account__button:hover,
.topbar-account__button:focus-visible {
  border-color: rgba(255, 232, 176, 0.32);
  color: #ffe8b0;
  outline: none;
}

.topbar-account__icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1.6px solid currentColor;
  border-radius: 999px;
  opacity: 0.9;
}

.topbar-account__icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 4px;
  height: 4px;
  border: 1.4px solid currentColor;
  border-radius: 999px;
  transform: translateX(-50%);
}

.topbar-account__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 8px;
  height: 4px;
  border: 1.4px solid currentColor;
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  border-bottom: 0;
  transform: translateX(-50%);
}

body.has-site-topbar {
  padding-top: var(--site-topbar-height);
}

body.has-site-topbar--overlay {
  padding-top: 0;
}

.site-legal-link {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 9990;
  color: rgba(255, 255, 255, 0.44);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  line-height: 1;
  text-decoration: none;
}

.site-legal-link:hover,
.site-legal-link:focus-visible {
  color: rgba(255, 232, 176, 0.86);
  outline: none;
}

@media (pointer: coarse), (max-width: 700px) {
  .topbar {
    gap: 10px;
    padding: max(7px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 7px max(8px, env(safe-area-inset-left));
  }

  .site-brand-logo {
    width: min(210px, 46vw);
    max-height: 30px;
  }

  .topbar__actions {
    gap: 5px;
    overflow: visible;
  }

  .topbar__nav {
    max-width: 42vw;
  }

  .topbar__nav a,
  .topbar__cart {
    height: 30px;
    min-height: 30px;
    padding: 6px 8px;
    font-size: 0.84rem;
  }

  .topbar-lang {
    padding: 4px 6px;
    gap: 0;
    border-radius: 8px;
  }

  .topbar-lang__label {
    display: none;
  }

  .topbar-lang select {
    min-width: 52px;
    font-size: 13px;
    padding: 3px 21px 3px 8px;
    border-radius: 7px;
    background-position:
      calc(100% - 10px) 52%,
      calc(100% - 6px) 52%;
    background-size: 4px 4px, 4px 4px;
  }

  .topbar-account__button {
    max-width: 96px;
    padding: 5px 7px;
    font-size: 0.82rem;
  }

  .topbar-account__button span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
