/**
 * Header top bar — call, social, contact dropdown, shop CTA, language (Polylang).
 */

.header-top-bar {
  position: relative;
  z-index: 3;
  background: #005eff;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-top-bar__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 42px;
  flex-wrap: nowrap;
  padding: 0.35rem 0;
}

.header-top-bar__inner--no-call .header-top-bar__toolbar {
  margin-left: 0;
  width: 100%;
  justify-content: flex-end;
}

.header-top-bar__toolbar {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  margin-left: auto;
  gap: 0;
  min-width: 0;
  flex: 0 1 auto;
}

.header-top-bar__left {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 0;
}

.header-top-bar__call-label {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8125rem;
}

.header-top-bar__call {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  min-width: 0;
}

.header-top-bar__call:hover,
.header-top-bar__call:focus-visible {
  color: #e0f2fe;
  text-decoration: underline;
  outline: none;
}

.header-top-bar__call:focus-visible {
  box-shadow: 0 0 0 2px #fff;
  border-radius: 4px;
}

.header-top-bar__call-icon {
  display: flex;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.95);
}

.header-top-bar__call-number {
  font-weight: 700;
  min-width: 0;
}

.header-top-bar__right {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
}

.header-top-bar__social {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.header-top-bar__right > .header-top-bar__social:first-child,
.header-top-bar__right > .header-top-bar__shop:first-child {
  border-left: none;
}

.header-top-bar__social-link {
  display: flex;
  color: #fff;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-top-bar__social-link:hover,
.header-top-bar__social-link:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  outline: none;
}

.header-top-bar__panel {
  position: relative;
  border: none;
  margin: 0;
}

.header-top-bar__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem;
  min-height: 42px;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  user-select: none;
  transition: background 0.2s ease;
}

.header-top-bar__summary::-webkit-details-marker {
  display: none;
}

.header-top-bar__summary::marker {
  display: none;
}

.header-top-bar__summary:hover,
.header-top-bar__panel[open] .header-top-bar__summary {
  background: rgba(0, 0, 0, 0.08);
}

.header-top-bar__summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.header-top-bar__chev {
  display: flex;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.header-top-bar__panel[open] .header-top-bar__chev {
  transform: rotate(180deg);
}

.header-top-bar__panel-body {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 240px;
  max-width: min(320px, 92vw);
  padding: 1rem 1.125rem;
  background: #fff;
  color: #0f172a;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.5;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  border-radius: 0 0 10px 10px;
  z-index: 5;
}

.header-top-bar__panel-body p {
  margin: 0 0 0.75rem 0;
  font-size: inherit;
  color: #334155;
}

.header-top-bar__panel-body a {
  color: #1877f2;
  font-weight: 600;
}

.header-top-bar__panel-body a:hover {
  text-decoration: underline;
}

.header-top-bar__panel-footer {
  margin-bottom: 0 !important;
  padding-top: 0.25rem;
  border-top: 1px solid #e2e8f0;
}

.header-top-bar__panel-link {
  font-size: 0.8125rem;
}

.header-top-bar__shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  min-height: 42px;
  background: #0d9488;
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  transition: filter 0.2s ease, background 0.2s ease;
}

.header-top-bar__shop:hover,
.header-top-bar__shop:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.header-top-bar__shop:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.header-top-bar__panel--lang {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  background: rgba(0, 0, 0, 0.22);
}

.header-top-bar__panel--lang .header-top-bar__summary--lang {
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 42px;
}

.header-top-bar__panel--lang[open] .header-top-bar__summary--lang,
.header-top-bar__panel--lang .header-top-bar__summary--lang:hover {
  background: rgba(255, 255, 255, 0.06);
}

.header-top-bar__lang-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 160px;
  background: #0f172a;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  z-index: 5;
}

.header-top-bar__lang-list a {
  display: block;
  padding: 0.5rem 1rem;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
}

.header-top-bar__lang-list a:hover,
.header-top-bar__lang-list a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

/* Tablet: allow toolbar to wrap as one unit, avoid stacking 4 full-width rows */
@media (max-width: 1024px) {
  .header-top-bar__inner {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  .header-top-bar__toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .header-top-bar {
    font-size: 0.75rem;
  }

  .header-top-bar__inner {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
    min-height: 0;
  }

  .header-top-bar__left {
    justify-content: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    flex-wrap: nowrap;
  }

  .header-top-bar__call-label {
    display: none;
  }

  .header-top-bar__call {
    justify-content: center;
    max-width: 100%;
  }

  .header-top-bar__call-number {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(300px, 88vw);
  }

  .header-top-bar__toolbar {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.4rem 0 0.45rem;
    align-items: start;
  }

  .header-top-bar__inner--no-call .header-top-bar__toolbar {
    padding-top: 0.45rem;
  }

  .header-top-bar__right {
    display: none;
  }

  .header-top-bar__panel--contact {
    grid-column: 1;
    grid-row: 1;
  }

  .header-top-bar__panel--lang {
    grid-column: 2;
    grid-row: 1;
    background: rgba(0, 0, 0, 0.18);
  }

  /* Polylang off: one full-width control */
  .header-top-bar__toolbar:not(:has(.header-top-bar__panel--lang)) .header-top-bar__panel--contact {
    grid-column: 1 / -1;
  }

  .header-top-bar__summary,
  .header-top-bar__panel--lang .header-top-bar__summary--lang {
    min-height: 40px;
    padding: 0 0.65rem;
    font-size: 0.65rem;
    justify-content: center;
    border-left: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.14);
  }

  .header-top-bar__panel--lang .header-top-bar__summary--lang {
    border-left: none;
  }

  .header-top-bar__panel-body,
  .header-top-bar__lang-list {
    position: static;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    border-radius: 0 0 8px 8px;
    margin-top: 0.25rem;
    box-shadow: none;
    border-top: 1px solid #e2e8f0;
    z-index: auto;
  }

  .header-top-bar__lang-list {
    border-top-color: rgba(255, 255, 255, 0.12);
  }

  /* Two toggles: open panel drops to row 2. Single contact-only: stay row 1 and grow downward */
  .header-top-bar__toolbar:has(.header-top-bar__panel--lang) .header-top-bar__panel[open] {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .header-top-bar__toolbar:not(:has(.header-top-bar__panel--lang)) .header-top-bar__panel--contact[open] {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}
