/**
 * Header styles: top-bar + logo icon + copy buttons.
 *
 * @package GingerHitechChild
 */

/* -----------------------------------------------------------------
   Top bar
   ----------------------------------------------------------------- */
.site-header__topbar {
  background: linear-gradient(to right, #e1241a 0%, #fe5c1a 100%);
  color: #ffffff;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 2.5rem;
  padding-block: 0.45rem;
}

.site-header__topbar-slogan {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}

.site-header__topbar-contacts {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

/* Обёртка "ссылка + кнопка копирования" */
.site-header__topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-header__topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease;
  white-space: nowrap;
}

.site-header__topbar-link svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.18s ease;
}

.site-header__topbar-link:hover,
.site-header__topbar-link:focus-visible {
  color: #e2231a;
  outline: none;
}

.site-header__topbar-link:hover svg,
.site-header__topbar-link:focus-visible svg {
  opacity: 1;
}

/* -----------------------------------------------------------------
   Copy button
   ----------------------------------------------------------------- */
.site-header__topbar-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.15s ease;
}

.site-header__topbar-copy:hover,
.site-header__topbar-copy:focus-visible {
  border-color: rgba(226, 35, 26, 0.6);
  background: rgba(226, 35, 26, 0.14);
  color: #ffffff;
  outline: none;
}

.site-header__topbar-copy:active {
  transform: scale(0.94);
}

.site-header__topbar-copy-icon {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
}

/* Вторая иконка (галочка) скрыта по умолчанию */
.site-header__topbar-copy-icon--check {
  display: none;
  color: #4ade80;
}

/* Состояние "скопировано" */
.site-header__topbar-copy.is-copied {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
}

.site-header__topbar-copy.is-copied .site-header__topbar-copy-icon--copy {
  display: none;
}

.site-header__topbar-copy.is-copied .site-header__topbar-copy-icon--check {
  display: block;
}

/* -----------------------------------------------------------------
   Site logo with icon
   ----------------------------------------------------------------- */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.site-logo__icon {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 0.5rem;
  object-fit: contain;
  background: transparent;
}

/* -----------------------------------------------------------------
   Планшет (≤1024px): прячем слоган, контакты в строку
   ----------------------------------------------------------------- */
@media (max-width: 1024px) {
  .site-header__topbar-inner {
    justify-content: flex-end;
    gap: 0.75rem;
  }

  .site-header__topbar-slogan {
    display: none;
  }

  .site-header__topbar-contacts {
    gap: 0.85rem;
  }

  /* Оставляем email и телефон с текстом */
  .site-header__topbar-item--email,
  .site-header__topbar-item--phone {
    display: inline-flex;
  }

  .site-header__topbar-link--email span,
  .site-header__topbar-link--phone span {
    display: inline;
    font-size: 0.8rem;
  }
}

/* -----------------------------------------------------------------
   Мобильные (≤640px): email + телефон полностью + кнопка копирования
   ----------------------------------------------------------------- */
@media (max-width: 640px) {
  .site-header__topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    min-height: 0;
    padding-block: 0.55rem;
  }

  .site-header__topbar-slogan {
    display: none;
  }

  .site-header__topbar-contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem 0.75rem;
    width: 100%;
  }

  .site-header__topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    flex: 1 1 45%;
  }

  .site-header__topbar-link {
    font-size: 0.78rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
  }

  .site-header__topbar-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header__topbar-link svg {
    width: 14px;
    height: 14px;
    opacity: 1;
  }

  .site-header__topbar-copy {
    width: 1.4rem;
    height: 1.4rem;
  }

  .site-header__topbar-copy-icon {
    width: 0.75rem;
    height: 0.75rem;
  }

  .site-logo__icon {
    width: 34px;
    height: 34px;
  }

  .site-logo {
    gap: 0.5rem;
  }
}

/* -----------------------------------------------------------------
   Очень узкие экраны (≤400px): email и телефон в столбик
   ----------------------------------------------------------------- */
@media (max-width: 400px) {
  .site-header__topbar-contacts {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header__topbar-item {
    flex: 1 1 100%;
  }

  .site-header__topbar-link {
    font-size: 0.76rem;
  }
}