/* Fullscreen RuStore cover after ticket finish — teach-app.ru */

.trc-cover {
  position: fixed !important;
  inset: 0;
  z-index: 12000 !important;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.3s ease;
  font-family: inherit;
  color: #fff;
  background: #050b16;
}

.trc-cover[hidden] {
  display: none !important;
}

.trc-cover.is-open {
  opacity: 1;
  pointer-events: auto !important;
}

.trc-cover__slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #050b16;
}

.trc-cover__slide {
  position: absolute;
  inset: 0;
  background-position: center center;
  /* contain: весь постер виден, без огромного кропа; поля — тёмный фон */
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.4s ease;
  will-change: opacity, transform;
}

.trc-cover__slide.is-active {
  opacity: 1;
}

.trc-cover:not(.is-reduced) .trc-cover__slide.is-active {
  animation: trc-kenburns 8s ease-in-out forwards;
}

@keyframes trc-kenburns {
  from { transform: scale(0.92); }
  to { transform: scale(0.96); }
}

.trc-cover__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 11, 22, 0.15) 0%,
    rgba(5, 11, 22, 0.2) 40%,
    rgba(5, 11, 22, 0.55) 68%,
    rgba(5, 11, 22, 0.92) 100%
  );
  pointer-events: none;
}

.trc-cover__panel {
  position: relative;
  z-index: 2;
  width: min(560px, calc(100% - 28px));
  margin: 0 auto 12px;
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px;
  background: rgba(12, 18, 32, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-height: 700px) {
  .trc-cover__panel {
    padding: 12px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .trc-cover__title {
    font-size: 1.05rem;
  }
  .trc-cover__lead {
    margin-bottom: 10px;
    font-size: 0.85rem;
  }
}

.trc-cover__season {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(255, 140, 40, 0.22);
  border: 1px solid rgba(255, 180, 90, 0.45);
  color: #ffe0b8;
}

.trc-cover__title {
  margin: 0 0 6px;
  font-size: clamp(1.15rem, 4.2vw, 1.45rem);
  line-height: 1.25;
  font-weight: 700;
}

.trc-cover__lead {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.trc-cover__row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.trc-cover__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trc-cover__cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  background: linear-gradient(180deg, #ff9a3c 0%, #e86a12 100%);
  color: #1a1008;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  box-shadow: 0 6px 18px rgba(232, 106, 18, 0.4);
  cursor: pointer;
  text-align: center;
}

.trc-cover__cta:hover,
.trc-cover__cta:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.trc-cover__cta-sub {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}

.trc-cover__stay {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

.trc-cover__stay:hover,
.trc-cover__stay:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.trc-cover__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}

.trc-cover__qr {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 120px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.trc-cover__qr img {
  width: 112px;
  height: 112px;
  display: block;
  background: #fff;
}

.trc-cover__qr span {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  max-width: 112px;
  color: #333;
}

@media (min-width: 720px) {
  .trc-cover__panel {
    width: min(640px, calc(100% - 40px));
    margin-bottom: 28px;
    padding: 18px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .trc-cover__qr {
    display: flex;
  }
}

@media (min-width: 1100px) {
  .trc-cover__panel {
    width: min(720px, calc(100% - 48px));
  }
  .trc-cover__qr {
    min-width: 132px;
    padding: 12px;
  }
  .trc-cover__qr img {
    width: 124px;
    height: 124px;
  }
  .trc-cover__qr span {
    max-width: 124px;
  }
}

.trc-sticky {
  position: fixed !important;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(120%);
  z-index: 11000 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100% - 24px));
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12, 18, 32, 0.92);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s ease;
  pointer-events: none !important;
}

.trc-sticky[hidden] {
  display: none !important;
}

.trc-sticky.is-open {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto !important;
}

.trc-sticky__text {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.3;
}

.trc-sticky__cta {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #e86a12;
  color: #1a1008;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.trc-sticky__x {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}

.trc-chip {
  position: fixed !important;
  right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 10900 !important;
  max-width: min(280px, calc(100% - 24px));
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12, 18, 32, 0.94);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none !important;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.trc-chip[hidden] {
  display: none !important;
}

.trc-chip.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto !important;
}

.trc-chip__title {
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 700;
}

.trc-chip__lead {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
}

.trc-chip__row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.trc-chip__cta {
  flex: 1;
  text-align: center;
  padding: 7px 8px;
  border-radius: 10px;
  background: #e86a12;
  color: #1a1008;
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: none;
}

.trc-chip__x {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
}

@media (prefers-reduced-motion: reduce) {
  .trc-cover,
  .trc-cover__slide,
  .trc-sticky,
  .trc-chip {
    transition: none !important;
    animation: none !important;
  }
  .trc-cover:not(.is-reduced) .trc-cover__slide.is-active {
    animation: none !important;
  }
}