/* ==========================================================================
   ОГЛАВЛЕНИЕ (subscriber-access.css) — UI подписчика (главная + лендинги)
   1. Шапка: иконка чата · email
   2. Карточка бренда: «написать»
   3. Кнопки «Вы подписаны» + иконка чата
   4. Подпись у видео, соцсети в модалке подписки
   ========================================================================== */

/* 1. ШАПКА — порядок: иконка чата · email · Блог · Меню */
.block-01__header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.hh-subscriber-badge {
  display: inline-block;
  max-width: none;
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
  background: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  vertical-align: middle;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

.hh-subscriber-badge[hidden],
[data-subscriber-lk][hidden] {
  display: none !important;
}

/* 2. ИКОНКА ЧАТА В ШАПКЕ */
@keyframes hhChatPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(180, 220, 255, 0);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 12px 2px rgba(160, 210, 255, 0.35);
  }
}

.hh-chat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid rgba(200, 230, 255, 0.55);
  background: rgba(120, 185, 240, 0.18);
  color: #e8f4ff;
  cursor: pointer;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast),
    color var(--duration-fast);
}

.hh-chat-btn:hover,
.hh-chat-btn:focus-visible {
  background: rgba(140, 200, 255, 0.32);
  border-color: rgba(220, 240, 255, 0.75);
  color: #fff;
  outline: none;
}

.hh-chat-btn__icon {
  display: block;
}

.hh-chat-btn--header {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  animation: hhChatPulse 2.6s ease-in-out infinite;
}

.hh-chat-btn--inline {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  pointer-events: auto;
  animation: none;
  box-shadow: none;
}

/* Совместимость со старым классом */
.hh-lk-btn--header {
  display: none !important;
}

/* 3. КАРТОЧКА БРЕНДА — имя + «написать», открывает чат */
button.block-01__brand.block-01__brand--open-chat {
  cursor: pointer;
  color: var(--color-text);
  font: inherit;
  text-align: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.block-01__brand--open-chat .block-01__brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 7.5rem;
  text-align: center;
}

.block-01__brand--open-chat .block-01__brand-name {
  display: block;
  width: 100%;
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.block-01__brand--open-chat .block-01__brand-write {
  display: block;
  width: 100%;
  margin: 0;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  background: linear-gradient(120deg, #ff6b1a 0%, #ff9f3d 50%, #ffb347 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.block-01__brand--open-chat .block-01__brand-text small {
  display: none;
}

/* 4. КНОПКИ «ВЫ ПОДИСАНЫ» */
.hh-subscribed-btn__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.hh-subscribed-btn__label {
  font-weight: inherit;
}

[data-home-subscribe].is-subscribed,
[data-gate-trigger="subscribe"].is-subscribed,
.block-08__subscribe-btn.is-subscribed {
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.92;
}

.hh-subscribed-btn__inner .hh-chat-btn--subscribed {
  pointer-events: none;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(200, 230, 255, 0.55);
  background: rgba(120, 185, 240, 0.18);
  color: #e8f4ff;
  animation: hhChatPulse 2.6s ease-in-out infinite;
}

.block-08__subscribe-btn.is-subscribed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 5. ПОДПИСЬ У ВИДЕО */
.course-free__heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 2.75rem 0 1.35rem;
}

.course-free__heading-row .course-free__heading-site {
  margin: 0;
}

.course-free__subscribed-note {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent-light);
  line-height: 1.4;
}

.course-free__subscribed-note[hidden] {
  display: none !important;
}

/* Модалка подписки для чата */
.hh-chat-subscribe__on-site {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #8ec8f8;
}

.hh-chat-subscribe .course-subscribe__lead {
  margin-top: 0;
}

/* 6. ССЫЛКИ НА СОЦСЕТИ */
.course-subscribe__social-view[hidden] {
  display: none !important;
}

.course-subscribe__social-lead {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.course-subscribe__social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.course-subscribe__social-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(125deg, #1976d2 0%, #1e88e5 40%, #26c6da 100%);
  box-shadow: 0 4px 18px rgba(30, 136, 229, 0.28);
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}

.course-subscribe__social-list a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(38, 198, 218, 0.35);
}

.course-subscribe__waiting {
  margin: 0.5rem 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .block-01__brand--open-chat .block-01__brand-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-width: 6.25rem;
  }
  .hh-subscriber-badge {
    display: none !important;
  }
  .hh-chat-btn--header {
    width: 34px;
    height: 34px;
  }
  .hh-chat-btn--header .hh-chat-btn__icon {
    width: 18px;
    height: 18px;
  }
  .course-free__heading-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .block-01__brand--open-chat {
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
  }
  .block-01__brand--open-chat .block-01__brand-text {
    display: flex;
    min-width: 5.75rem;
  }
  .block-01__brand--open-chat .block-01__brand-name {
    font-size: 0.75rem;
  }
  .block-01__brand--open-chat .block-01__brand-write {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hh-chat-btn--header {
    animation: none;
  }
}
