/* =========================================================================
   ПЛАВАЮЩИЕ ЭЛЕМЕНТЫ: карточка акции, cookie-баннер
   ========================================================================= */

/* ---------- Плавающая акция (страница объекта) ---------- */
.broadcasting-action {
  position: fixed;
  z-index: 9990;
  right: 24px;
  bottom: 96px;               /* выше виджета обратной связи в правом нижнем углу */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: inherit;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity var(--rs-dur) var(--rs-ease), transform var(--rs-dur) var(--rs-ease-out);
}

.broadcasting-action[hidden] {
  display: none;
}

.broadcasting-action.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.broadcasting-action.is-visible > * {
  pointer-events: auto;
}

.broadcasting-action__card {
  position: relative;
  width: 340px;
  overflow: hidden;
  border: 1px solid var(--rs-line);
  border-radius: var(--rs-radius-lg);
  background: var(--rs-surface);
  box-shadow: var(--rs-shadow-lg);
  transform-origin: bottom right;
  transition: opacity var(--rs-dur) var(--rs-ease), transform var(--rs-dur) var(--rs-ease-out), visibility 0s linear 0s;
}

.broadcasting-action.is-collapsed .broadcasting-action__card {
  position: absolute;
  right: 0;
  bottom: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none !important;
  transform: translateY(10px) scale(0.92);
  transition: opacity var(--rs-dur-fast) var(--rs-ease), transform var(--rs-dur-fast) var(--rs-ease), visibility 0s linear var(--rs-dur-fast);
}

.broadcasting-action__image {
  display: block;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.broadcasting-action__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--rs-ease-out);
}

.broadcasting-action__image:hover img {
  transform: scale(1.04);
}

.broadcasting-action__content {
  padding: 18px 20px 20px;
}

.broadcasting-action__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: var(--rs-radius-pill);
  background: var(--rs-accent-50);
  color: var(--rs-accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--rs-tracking-caps);
  text-transform: uppercase;
}

.broadcasting-action__title {
  display: block;
  margin-bottom: 8px;
  color: var(--rs-ink) !important;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  transition: color var(--rs-dur-fast) var(--rs-ease);
}

.broadcasting-action__title:hover {
  color: var(--rs-accent-600) !important;
}

.broadcasting-action__description {
  display: -webkit-box;
  margin-bottom: 16px;
  overflow: hidden;
  color: var(--rs-muted);
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.broadcasting-action__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--rs-accent);
  box-shadow: var(--rs-shadow-accent);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background var(--rs-dur-fast) var(--rs-ease), transform var(--rs-dur-fast) var(--rs-ease);
}

.broadcasting-action__button:hover {
  background: var(--rs-accent-600);
  transform: translateY(-1px);
}

.broadcasting-action__close {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(8, 18, 34, 0.5);
  -webkit-backdrop-filter: var(--rs-blur);
  backdrop-filter: var(--rs-blur);
  color: #fff;
  cursor: pointer;
  transition: background var(--rs-dur-fast) var(--rs-ease), transform var(--rs-dur-fast) var(--rs-ease);
}

.broadcasting-action__close:hover {
  background: rgba(8, 18, 34, 0.8);
  transform: rotate(90deg);
}

/* Свёрнутое состояние — компактная кнопка «% Акция» */
.broadcasting-action__icon {
  position: relative;
  display: none;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 18px 0 8px;
  overflow: hidden;
  border: 0;
  border-radius: var(--rs-radius-pill);
  background: var(--rs-accent);
  box-shadow: var(--rs-shadow-accent);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--rs-dur-fast) var(--rs-ease), box-shadow var(--rs-dur-fast) var(--rs-ease);
}

.broadcasting-action.is-collapsed .broadcasting-action__icon {
  display: inline-flex;
  animation: rs-pop-in 0.35s var(--rs-ease-out);
}

.broadcasting-action__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: rs-shine 3.2s ease-in-out 1s infinite;
  pointer-events: none;
}

.broadcasting-action__icon:hover {
  box-shadow: 0 12px 30px rgba(229, 46, 16, 0.4);
  transform: translateY(-2px);
}

.broadcasting-action__icon-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.broadcasting-action__icon-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@keyframes rs-pop-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rs-shine {
  0% {
    transform: translateX(-120%);
  }

  45%,
  100% {
    transform: translateX(120%);
  }
}

@media (max-width: 767px) {
  .broadcasting-action {
    right: 12px;
    bottom: 84px;
  }

  .broadcasting-action__card {
    width: calc(100vw - 24px);
    max-width: 360px;
  }

  .broadcasting-action__image {
    height: 150px;
  }

  .broadcasting-action__content {
    padding: 16px;
  }

  .broadcasting-action__icon {
    height: 48px;
  }
}

/* ---------- Cookie-баннер ---------- */
.cookie-consent {
  position: fixed;
  z-index: var(--rs-z-cookie);
  bottom: 24px;
  left: 24px;
  width: min(440px, calc(100vw - 48px));
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity var(--rs-dur) var(--rs-ease), transform var(--rs-dur-slow) var(--rs-ease-out);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cookie-consent__container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: var(--rs-radius-lg);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: var(--rs-blur);
  backdrop-filter: var(--rs-blur);
  box-shadow: var(--rs-shadow-lg);
}

.cookie-consent__content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cookie-consent__icon {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--rs-brand-50);
  color: var(--rs-brand);
}

.cookie-consent__text {
  flex: 1;
  min-width: 0;
}

.cookie-consent__text strong {
  display: block;
  margin-bottom: 3px;
  color: var(--rs-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.cookie-consent__text p {
  margin: 0;
  color: var(--rs-muted);
  font-size: 13px;
  line-height: 1.5;
}

.cookie-consent__text a {
  color: var(--rs-brand);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rs-brand-200);
  text-underline-offset: 2px;
}

.cookie-consent__text a:hover {
  text-decoration-color: currentColor;
}

.cookie-consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cookie-consent__btn {
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--rs-dur-fast) var(--rs-ease), border-color var(--rs-dur-fast) var(--rs-ease), color var(--rs-dur-fast) var(--rs-ease);
}

.cookie-consent__btn--accept {
  background: var(--rs-brand);
  box-shadow: var(--rs-shadow-brand);
  color: #fff;
}

.cookie-consent__btn--accept:hover {
  background: var(--rs-brand-800);
}

.cookie-consent__btn--decline {
  border-color: var(--rs-line);
  background: var(--rs-surface);
  color: var(--rs-text);
}

.cookie-consent__btn--decline:hover {
  border-color: var(--rs-subtle);
  background: var(--rs-surface-2);
}

@media (max-width: 575px) {
  .cookie-consent {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }

  .cookie-consent__container {
    padding: 16px;
  }
}
