/* Restricted page styling. */

.rw-restricted {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 7rem) 1.5rem;
  min-height: calc(100vh - 160px);
  background:
    radial-gradient(900px 420px at 12% 18%, rgba(150, 20, 30, 0.2), rgba(0, 0, 0, 0) 60%),
    radial-gradient(820px 420px at 88% 22%, rgba(20, 60, 90, 0.16), rgba(0, 0, 0, 0) 62%),
    linear-gradient(180deg, rgba(4, 5, 8, 0.98), rgba(8, 10, 16, 0.96));
}

.rw-restricted::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, rgba(0, 0, 0, 0) 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.03) 1px, rgba(0, 0, 0, 0) 1px);
  background-size: 120px 120px;
  opacity: 0.18;
  mask-image: radial-gradient(60% 45% at 50% 35%, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.rw-restricted__stage {
  position: relative;
  z-index: 1;
}

.rw-restricted__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 7vw, 4rem);
  align-items: center;
}

.rw-restricted--granted .rw-restricted__inner {
  max-width: 1240px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.rw-restricted--granted .rw-restricted__poster {
  display: none;
}

.rw-restricted__panel {
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: 28px;
  background: rgba(8, 10, 15, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.rw-restricted__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(200, 40, 55, 0.2);
  border: 1px solid rgba(200, 40, 55, 0.4);
  color: rgba(255, 120, 120, 0.95);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rw-restricted__badge--granted {
  background: rgba(60, 180, 120, 0.18);
  border-color: rgba(60, 180, 120, 0.42);
  color: rgba(140, 240, 190, 0.95);
}

.rw-restricted__title {
  margin: 1.1rem 0 1rem;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.1;
}

.rw-restricted__lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.85;
}

.rw-restricted__actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.rw-restricted__meta {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  opacity: 0.6;
}

.rw-restricted__content {
  margin-top: 1.25rem;
  font-size: 1.02rem;
  line-height: 1.75;
  opacity: 0.88;
}

.rw-restricted__content p + p {
  margin-top: 1rem;
}

.rw-restricted__catalog {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rw-restricted__catalogTitle {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.rw-restricted__catalogLead {
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
  opacity: 0.7;
}

.rw-restricted__viewNav {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.rw-restricted__viewBack,
.rw-restricted__viewShop {
  min-height: 44px;
}

.rw-restricted__channels {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rw-restricted__channelsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.rw-restricted__channelCard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.2rem;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(150deg, rgba(10, 14, 20, 0.95), rgba(25, 8, 13, 0.86));
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.rw-restricted__channelCard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0));
  opacity: 0.45;
  pointer-events: none;
}

.rw-restricted__channelCard--horror {
  border-color: rgba(205, 54, 95, 0.35);
  background:
    linear-gradient(150deg, rgba(24, 7, 11, 0.96), rgba(8, 13, 24, 0.9)),
    radial-gradient(circle at 8% 18%, rgba(205, 54, 95, 0.35), rgba(0, 0, 0, 0) 62%);
}

.rw-restricted__channelCard--hardcore {
  border-color: rgba(220, 166, 86, 0.42);
  background:
    linear-gradient(148deg, rgba(18, 8, 9, 0.96), rgba(14, 16, 26, 0.9)),
    radial-gradient(circle at 7% 16%, rgba(220, 166, 86, 0.28), rgba(0, 0, 0, 0) 62%);
}

.rw-restricted__channelCard--disabled {
  opacity: 0.72;
}

.rw-restricted__channelMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.rw-restricted__channelIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rw-restricted__channelCount {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.rw-restricted__channelTitle {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
}

.rw-restricted__channelLead {
  margin: 0;
  opacity: 0.76;
  line-height: 1.6;
}

.rw-restricted__channelAction {
  margin-top: auto;
  align-self: flex-start;
}

.rw-restricted__channelHint {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  opacity: 0.72;
}

.rw-restricted__catalog .rw-shopGrid {
  margin-top: 1.5rem;
}

.rw-restricted .rw-shopGrid__frame {
  padding: clamp(1.2rem, 2.8vw, 1.6rem);
}

.rw-restricted .rw-restricted__catalog ul.products {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.rw-restrictedPage ul.products {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-items: stretch;
  align-items: stretch;
  width: 100%;
}

body.rw-restrictedPage ul.products li.product {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
}

body.rw-restrictedPage .rw-productCard {
  position: relative;
  width: 100%;
  max-width: 100%;
}

body.rw-restrictedPage .rw-productCard__linkOverlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  text-indent: -9999px;
  border-radius: inherit;
}

.rw-restricted ul.productColumns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-items: stretch;
  align-items: stretch;
  width: 100%;
}

.rw-restricted ul.productColumns > li {
  width: auto !important;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: block;
  box-sizing: border-box;
}

.rw-restricted ul.productColumns > li img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rw-restricted a.rw_productoverlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  text-indent: -9999px;
  border-radius: inherit;
}

.rw-restricted__empty {
  margin: 0;
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.98rem;
  opacity: 0.75;
}

.rw-restricted__pagination {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.rw-restricted__pagination .nav-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.rw-restricted__pagination .page-numbers {
  min-width: 40px;
  height: 40px;
  padding: 0 0.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.rw-restricted__pagination .page-numbers:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

.rw-restricted__pagination .page-numbers.current {
  background: linear-gradient(135deg, rgba(255, 90, 70, 0.95), rgba(214, 178, 90, 0.9));
  border-color: rgba(255, 90, 70, 0.95);
  color: #05060a;
}

.rw-restricted__pagination .page-numbers.prev,
.rw-restricted__pagination .page-numbers.next {
  min-width: 96px;
}

.rw-restricted__poster {
  display: flex;
  justify-content: center;
  animation: rw-restricted-float 7s ease-in-out infinite;
}

.rw-restricted__posterFrame {
  position: relative;
  width: min(360px, 72vw);
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(6, 7, 11, 0.95), rgba(18, 8, 14, 0.92)),
    url("../images/restricted_image.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.rw-restricted__glow {
  position: absolute;
  inset: -30% 0 40% 0;
  background: radial-gradient(circle at 50% 30%, rgba(255, 80, 80, 0.25), rgba(0, 0, 0, 0));
  opacity: 0.8;
}

.rw-restricted__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.04) 1px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0) 4px
  );
  opacity: 0.35;
  animation: rw-restricted-scan 6s linear infinite;
  mix-blend-mode: screen;
}

.rw-restricted__lock {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 160px;
  transform: translate(-50%, -50%);
}

.rw-restricted__lockShackle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 96px;
  height: 70px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-bottom: none;
  border-radius: 60px 60px 0 0;
  transform: translateX(-50%);
  box-shadow: 0 0 30px rgba(255, 120, 120, 0.25);
}

.rw-restricted__lockBody {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 140px;
  height: 100px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 90, 90, 0.65), rgba(120, 30, 40, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateX(-50%);
  box-shadow: 0 12px 30px rgba(255, 60, 60, 0.3);
}

.rw-restricted__lockCore {
  position: absolute;
  top: 62%;
  left: 50%;
  width: 16px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(255, 120, 120, 0.6);
}

.rw-restricted__sigil {
  position: absolute;
  inset: 22% 18% 18% 22%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0));
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

@keyframes rw-restricted-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes rw-restricted-scan {
  0% {
    transform: translateY(-12%);
  }
  100% {
    transform: translateY(12%);
  }
}

@media (max-width: 960px) {
  .rw-restricted__inner {
    grid-template-columns: 1fr;
  }

  .rw-restricted__poster {
    order: 1;
    margin-top: 1.5rem;
  }
}

@media (max-width: 640px) {
  .rw-restricted {
    padding: clamp(2.2rem, 9vw, 3.5rem) 1rem;
    min-height: auto;
  }

  .rw-restricted__panel {
    padding: 1.6rem;
  }

  .rw-restricted__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rw-restricted__channelsGrid {
    grid-template-columns: 1fr;
  }

  .rw-restricted__viewNav {
    flex-direction: column;
    align-items: stretch;
  }

  .rw-restricted__viewBack,
  .rw-restricted__viewShop {
    width: 100%;
    justify-content: center;
  }

  .rw-restricted .rw-shopGrid__frame {
    padding: 1.1rem;
  }

  .rw-restricted__pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    padding: 0 0.7rem;
  }

  .rw-restricted .rw-restricted__catalog ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .rw-restricted ul.productColumns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

@media (max-width: 420px) {
  .rw-restricted .rw-restricted__catalog ul.products {
    grid-template-columns: minmax(0, 1fr);
  }

  .rw-restricted ul.productColumns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rw-restricted__poster,
  .rw-restricted__scan {
    animation: none !important;
  }
}
