@property --service-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

[data-service-theme="movies-series"] {
  --service-idle: linear-gradient(135deg, #2c234a, #1c1c38);
  --service-action: linear-gradient(125deg, #414fac, #693b9f 76%, #794497);
  --service-edge: #8b77dc;
  --service-border: #514275;
  --service-highlight: #d0b5ff;
  --service-glow: #9664e54a;
  --service-surface: #1b192e;
  --service-texture: repeating-linear-gradient(114deg, transparent 0 28px, #dbb7ff0b 29px 30px, transparent 31px 43px);
  --service-color: #f9f5ff;
}

[data-service-theme="live-tv"] {
  --service-idle: linear-gradient(135deg, #17392e, #14292b);
  --service-action: linear-gradient(125deg, #155645, #167159 72%, #176451);
  --service-edge: #4fae88;
  --service-border: #335a50;
  --service-highlight: #9de6be;
  --service-glow: #38ba7751;
  --service-surface: #132628;
  --service-texture: repeating-linear-gradient(98deg, #a2ffd20a 0 23px, transparent 23px 47px);
  --service-color: #f0fff7;
}

[data-service-theme="music-podcasts"] {
  --service-idle: linear-gradient(135deg, #3c2140, #291c3a);
  --service-action: linear-gradient(125deg, #8e3268, #923c86 72%, #743993);
  --service-edge: #c873ba;
  --service-border: #64405f;
  --service-highlight: #ffc2ed;
  --service-glow: #d35da64d;
  --service-surface: #281a2e;
  --service-texture: repeating-linear-gradient(82deg, transparent 0 18px, #ffc0e910 19px 20px, transparent 21px 33px);
  --service-color: #fff1f9;
}

[data-service-theme="nexus-package"] {
  --service-idle: linear-gradient(128deg, #ffebba, #e8b96c 58%, #c78b44);
  --service-action: linear-gradient(124deg, #ecba6b, #fff1cb 33%, #f6d489 51%, #d8a356 78%, #f1c77e);
  --service-edge: #edc47f;
  --service-border: #9e7442;
  --service-highlight: #ffe4aa;
  --service-glow: #e2a54f3d;
  --service-surface: #271b1c;
  --service-texture: repeating-linear-gradient(142deg, transparent 0 3px, #fff6db0e 3px 4px);
  --service-color: #2a1909;
}

.subscription-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 13px;
  margin: 0 0 20px;
}

#subscriptions .card ul {
  list-style: disc;
  padding-inline: 20px 0;
}

.connection-choice,
.connection-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-inline-size: 0;
}

.connection-choice {
  max-inline-size: 28rem;
  margin-block-end: 20px;
}

.connection-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 8px);
  padding: 8px;
  border: 1px solid var(--service-border);
  border-radius: 16px;
  background: var(--service-texture), linear-gradient(150deg, var(--service-surface), #11141f 79%);
  box-shadow: inset 0 1px #ffffff10, 0 6px 18px #08081555;
}

.connection-picker-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.connection-picker-option input,
.connection-picker-caption {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: 0;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.connection-picker-option input { min-block-size: 0; }

.connection-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-block-size: 56px;
  place-content: center;
  justify-items: center;
  gap: .32rem;
  border: 1px solid #ffffff1c;
  border-radius: 10px;
  background: #0b101b9c;
  color: var(--service-highlight);
  font-size: 1.04rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.connection-screens {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 55px;
  max-inline-size: calc(100% - 4px);
  min-block-size: 18px;
}

.connection-screen {
  flex: 0 1 14px;
  min-inline-size: 0;
  block-size: 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: linear-gradient(150deg, color-mix(in srgb, currentColor 19%, #171b27), #111821 65%);
  box-shadow:
    inset 0 1px #ffffff40,
    1px 1px 0 color-mix(in srgb, currentColor 63%, #101523),
    2px 2px 0 color-mix(in srgb, currentColor 32%, #101523),
    0 4px 0 -2px currentColor;
  transform: perspective(62px) rotateY(-22deg) rotateX(9deg);
}

.connection-screen + .connection-screen { margin-inline-start: -4px; }
.connection-screen:nth-child(odd):not(:only-child) { translate: 0 -1.5px; }
.connection-screen:nth-child(even) { translate: 0 1.5px; }

@media (hover: hover) {
  .connection-picker-option:hover .connection-tile {
    border-color: var(--service-edge);
    transform: translateY(-2px);
  }
}

.connection-picker-option input:checked + .connection-tile {
  border-color: var(--service-edge);
  background: var(--service-texture), var(--service-action);
  color: var(--service-color);
  box-shadow: inset 0 1px #ffffff2e, 0 0 14px var(--service-glow);
}

.connection-picker-option input:checked + .connection-tile .connection-screen {
  background: linear-gradient(140deg, transparent 39%, #ffffff3a 43% 55%, transparent 59%), var(--service-action);
}

.connection-picker-option input:checked + .connection-tile .connection-screens {
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--service-highlight) 68%, transparent));
}

.connection-picker-option input:focus-visible + .connection-tile {
  outline: 2px solid #a8d8ff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .connection-screens { transition: translate .18s ease-out, filter .2s ease; }

  :where(.connection-picker-option input:checked + .connection-tile) .connection-screens {
    translate: 0 -1.5px;
  }

  .connection-picker-option:active .connection-screens,
  .connection-picker-option input:focus-visible + .connection-tile .connection-screens {
    translate: 0 -3px;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .connection-picker-option:hover .connection-screens { translate: 0 -3px; }
}

.subscription-selector .button[data-service-tab] {
  position: relative;
  isolation: isolate;
  min-block-size: 48px;
  border-color: var(--service-border);
  background: var(--service-texture), var(--service-idle);
  box-shadow: inset 0 1px #ffffff0e, 0 4px 12px #06061155;
  color: var(--service-color);
}

.subscription-selector .button[data-service-tab][aria-pressed="true"] {
  border-color: var(--service-edge);
  background: var(--service-texture), var(--service-action);
  box-shadow: 0 0 0 1px var(--service-border), 0 7px 20px var(--service-glow);
}

#subscriptions [data-service-theme] .card {
  position: relative;
  isolation: isolate;
  border-color: var(--service-border);
  background:
    radial-gradient(ellipse at top right, var(--service-glow), transparent 66%),
    linear-gradient(155deg, var(--service-surface), #10111c 82%);
  box-shadow: inset 0 1px #ffffff0f, 0 17px 35px #07071460;
}

.service-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  mask-image: linear-gradient(140deg, transparent 22%, #000 70%);
}

[dir="rtl"] .service-art {
  mask-image: linear-gradient(220deg, transparent 22%, #000 70%);
}

.service-art > span {
  position: absolute;
  inset-block-start: 8%;
  inset-inline-end: -12px;
  inline-size: clamp(152px, 34vw, 278px);
  aspect-ratio: 1.62;
  opacity: .58;
}

[data-service-theme="live-tv"] .service-art > span {
  inset-block-start: 11%;
  inset-inline-end: -4px;
  border: 2px solid #c9ffe0b0;
  border-radius: 6px;
  background:
    radial-gradient(circle, #e0ffebc0 0 2px, transparent 3px),
    radial-gradient(circle, transparent 0 21px, #c4fadc9c 22px 23px, transparent 24px),
    linear-gradient(90deg, transparent 49.6%, #c4fadc9c 49.6% 50.4%, transparent 50.4%),
    repeating-linear-gradient(90deg, #38865b 0 23px, #226d4b 23px 46px);
  box-shadow: 0 0 0 7px #245d408c, 0 12px 30px #050f0b70;
  transform: rotate(-13deg);
}

[data-service-theme="live-tv"] .service-art > span::before,
[data-service-theme="live-tv"] .service-art > span::after {
  position: absolute;
  inset-block-start: 25%;
  inline-size: 17%;
  block-size: 50%;
  border: 1.5px solid #c9ffe0a0;
  content: "";
}

[data-service-theme="live-tv"] .service-art > span::before {
  left: -1px;
  border-left: 0;
}

[data-service-theme="live-tv"] .service-art > span::after {
  right: -1px;
  border-right: 0;
}

[data-service-theme="movies-series"] .service-art > span {
  border: 8px solid #48386b;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 76% 50%, #ac76e54f, transparent 70%),
    repeating-linear-gradient(90deg, #443461 0 78px, #7b5798 78px 81px);
  box-shadow: 0 0 20px #874bf03b;
  transform: rotate(-17deg);
}

[data-service-theme="movies-series"] .service-art > span::before,
[data-service-theme="movies-series"] .service-art > span::after {
  position: absolute;
  inset-inline: -3px;
  block-size: 6px;
  background: repeating-linear-gradient(90deg, #d1abff85 0 8px, transparent 8px 17px);
  content: "";
}

[data-service-theme="movies-series"] .service-art > span::before { inset-block-start: -7px; }
[data-service-theme="movies-series"] .service-art > span::after { inset-block-end: -7px; }

[data-service-theme="music-podcasts"] .service-art > span {
  inset-block-start: -5%;
  inset-inline-end: -17px;
  inline-size: clamp(148px, 29vw, 228px);
  aspect-ratio: 1;
  border: 2px solid #d589cc70;
  border-radius: 50%;
  background:
    radial-gradient(circle, #21142b 0 4%, #e691cc 4.5% 17%, transparent 17.5%),
    conic-gradient(from 35deg, transparent, #ba69a754 23%, transparent 39%, #bf58954f 60%, transparent 78%),
    repeating-radial-gradient(circle, #48223e 0 5px, #7f3e6b 5px 6px, #351d38 6px 9px);
  box-shadow: 0 0 28px #dc6eb035;
}

[data-service-theme="nexus-package"] .service-art > span {
  inset-block-start: -5%;
  inset-inline-end: -8px;
  inline-size: clamp(138px, 26vw, 208px);
  aspect-ratio: 1;
  border: 2px solid #e9bd748f;
  border-radius: 50%;
  background:
    radial-gradient(circle, #21171adb 0 52%, #edc27a80 53% 54%, transparent 55% 63%, #39201c 64% 65%, transparent 66%),
    repeating-conic-gradient(from 8deg, #f0ce8a28 0deg 1deg, transparent 1deg 4deg),
    conic-gradient(from 28deg, #946333, #ffdf9a, #7a4f29, #312022, #c69253, #946333);
  box-shadow: 0 0 24px #d5a25b3d, inset 0 0 13px #180d1699;
  transform: rotate(-11deg);
}

[data-service-theme="nexus-package"] .service-art > span::before {
  position: absolute;
  z-index: 1;
  inset-block-start: 28%;
  inset-inline-end: 27%;
  inline-size: 17px;
  aspect-ratio: 1;
  background: #fff2cd;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  content: "";
}

[data-service-theme="nexus-package"] .service-art > span::after {
  position: absolute;
  inset: 32% 27% 26%;
  background:
    linear-gradient(0deg, transparent 69%, #fff0c68c 70% 72%, transparent 73%),
    conic-gradient(from 0deg at 50% 29%, #ffe5a6 0deg 48deg, #bc7e3b 48deg 72deg, #805126 72deg 156deg, #e9ba6f 156deg 204deg, #ac763d 204deg 288deg, #f5cd82 288deg 312deg, #fff0bc 312deg);
  clip-path: polygon(22% 0, 78% 0, 100% 30%, 50% 100%, 0 30%);
  content: "";
}

#subscriptions [data-service-theme] .card:is(:hover, :focus-within) {
  border-color: var(--service-edge);
  box-shadow: 0 14px 32px #07071499, 0 0 23px var(--service-glow);
}

#subscriptions [data-service-theme="nexus-package"] .card {
  --nexus-inlay: inset 0 0 0 3px #171118, inset 0 0 0 4px #e1b57049;
  background:
    radial-gradient(ellipse at top right, #72502b8c, transparent 64%),
    radial-gradient(ellipse at bottom left, #6440213d, transparent 69%),
    linear-gradient(149deg, #231a1f, #151219 63%, #211822);
  box-shadow: var(--nexus-inlay), 0 13px 27px #03030991, 0 0 23px #e2a54f26;
}

#subscriptions [data-service-theme="nexus-package"] .card:is(:hover, :focus-within) {
  box-shadow: var(--nexus-inlay), 0 14px 32px #07071499, 0 0 27px var(--service-glow);
}

#subscriptions [data-service-theme] .price,
#subscriptions [data-service-theme] .yearly-value {
  color: var(--service-highlight);
}

#subscriptions [data-service-theme] .plan-action,
#booking-add-service[data-service-theme] {
  border-color: var(--service-edge);
  background: var(--service-texture), var(--service-action);
  color: var(--service-color);
  box-shadow: inset 0 1px #ffffff24, 0 7px 21px var(--service-glow);
}

#subscriptions [data-service-theme] .plan-action:hover,
#booking-add-service[data-service-theme]:hover {
  filter: brightness(1.1);
}

.service-decoration {
  position: absolute;
  z-index: 1;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  --service-rim-opacity: .59;
  pointer-events: none;
  transition: opacity .2s ease;
}

.service-decoration::before {
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--service-angle), transparent 7%, var(--service-edge) 26%, var(--service-highlight) 51%, #fffd 57%, transparent 77%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: service-border-sweep 8s linear infinite paused;
  opacity: var(--service-rim-opacity);
  content: "";
}

[data-service-theme="nexus-package"] > .service-decoration::before,
[data-service-theme="nexus-package"] .card > .service-decoration::before {
  padding: 2px;
  background: conic-gradient(from var(--service-angle), #8d5b3230 3%, #d3a15c8c 17%, #f4ca80 24%, #fff6d9 30%, #f2d797 32%, #b6804566 37%, #8d5b3230 47%, #daaf679c 67%, #8d5b3230 81%);
  animation-duration: 10s;
  opacity: .9;
}

@keyframes service-border-sweep { to { --service-angle: 360deg; } }

.service-symbol {
  --symbol-size: 15px;
  --symbol-center: -50%;
  --symbol-lift: 56%;
  --symbol-float-duration: 4.8s;
  --symbol-float-delay: -.8s;
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: clamp(13px, var(--symbol-position), calc(100% - 13px));
  display: grid;
  inline-size: calc(var(--symbol-size) + 6px);
  block-size: calc(var(--symbol-size) + 6px);
  place-items: center;
  translate: var(--symbol-center) calc(-1 * var(--symbol-lift));
  rotate: -14deg;
  color: var(--service-highlight);
  font: 400 var(--symbol-size)/1 "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  filter: drop-shadow(0 1px 3px #04050ae5);
}

.service-symbol::before { content: attr(data-glyph); }
[dir="rtl"] .service-symbol { --symbol-center: 50%; }

.service-symbol[data-edge="bottom"] {
  inset-block-start: auto;
  inset-block-end: 0;
  translate: var(--symbol-center) var(--symbol-lift);
}

#subscriptions .card .service-symbol {
  --symbol-size: 19px;
  inset-inline-start: clamp(17px, var(--symbol-position), calc(100% - 17px));
}

#subscriptions .card .service-symbol:is([data-edge="start"], [data-edge="end"]) {
  inset-block-start: var(--symbol-position);
  inset-inline-start: 0;
  translate: var(--symbol-center) -50%;
}

#subscriptions .card .service-symbol[data-edge="end"] {
  inset-inline-start: auto;
  inset-inline-end: 0;
  translate: calc(-1 * var(--symbol-center)) -50%;
}

.service-symbol:nth-child(3n + 2) {
  --symbol-lift: 72%;
  --symbol-float-duration: 5.6s;
  --symbol-float-delay: -2.4s;
  rotate: 14deg;
  font-size: calc(var(--symbol-size) - 1px);
}

.service-symbol:nth-child(3n) {
  --symbol-lift: 43%;
  --symbol-float-duration: 4.2s;
  --symbol-float-delay: -1.6s;
  rotate: 5deg;
  font-size: calc(var(--symbol-size) - 3px);
}

[data-service-theme="nexus-package"] .service-symbol[data-glyph="💎"]::after {
  position: absolute;
  inset-block-start: 1px;
  inset-inline-end: -1px;
  inline-size: 7px;
  aspect-ratio: 1;
  background: #ffe4a0;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: .55;
  content: "";
}

@keyframes service-symbol-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes service-gem-sparkle {
  0%, 57%, 100% { opacity: .25; scale: .72; }
  70% { opacity: .92; scale: 1.1; }
}

@media (prefers-reduced-motion: no-preference) {
  .subscription-selector .button[aria-pressed="true"] > .service-decoration > .service-symbol,
  #subscriptions [data-service-theme]:not([hidden]) .card > .service-decoration > .service-symbol {
    animation: service-symbol-float var(--symbol-float-duration) ease-in-out var(--symbol-float-delay) infinite;
  }

  .subscription-selector .button[aria-pressed="true"] > .service-decoration > .service-symbol[data-glyph="💎"]::after,
  #subscriptions [data-service-theme="nexus-package"]:not([hidden]) .card > .service-decoration > .service-symbol[data-glyph="💎"]::after {
    animation: service-gem-sparkle 5.6s ease-in-out infinite;
  }
}

.subscription-selector .button[aria-pressed="true"] > .service-decoration,
#subscriptions [data-service-theme]:not([hidden]) .card > .service-decoration,
.subscription-selector .button:focus-visible > .service-decoration,
#subscriptions .card:focus-within > .service-decoration {
  opacity: 1;
}

.subscription-selector .button[aria-pressed="true"] > .service-decoration::before,
#subscriptions [data-service-theme]:not([hidden]) .card > .service-decoration::before,
.subscription-selector .button:focus-visible > .service-decoration::before,
#subscriptions .card:focus-within > .service-decoration::before {
  animation-play-state: running;
}

@media (hover: hover) {
  .subscription-selector .button:hover > .service-decoration,
  #subscriptions .card:hover > .service-decoration { opacity: 1; --service-rim-opacity: .94; }

  .subscription-selector .button:hover > .service-decoration::before,
  #subscriptions .card:hover > .service-decoration::before { animation-play-state: running; }
}

@media (max-width: 700px) {
  #subscriptions .cards { row-gap: 31px; }
  .service-art > span { opacity: .42; }
}

@media (max-width: 560px) {
  .subscription-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-selector .button { inline-size: 100%; padding: .68rem .5rem; font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .connection-tile { transition: none; }
  .connection-picker-option:hover .connection-tile { transform: none; }
  .service-decoration { transition: none; }
  .service-decoration::before { animation: none; }
  #subscriptions [data-service-theme] .card:hover,
  .subscription-selector .button[data-service-tab]:hover { transform: none; }
}
