/* Surface colors, reflections and blur from the LF VPN Mini App. */
:root[data-theme] {
  --native-glass: linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.07) 65%, rgba(255,255,255,.12));
  --native-float: linear-gradient(125deg, rgba(255,255,255,.13), rgba(255,255,255,.045) 52%, rgba(255,255,255,.08));
  --native-rim: 0 12px 30px -20px rgba(35,56,106,.3), inset 0 1px 0 rgba(255,255,255,.96), inset 0 -1px 0 rgba(255,255,255,.36);
  --native-header-tint: rgba(234,240,251,.69);
  --native-header-rim: inset 0 1px 0 rgba(255,255,255,.96), inset 0 -1px 0 rgba(255,255,255,.36);
  --native-edge: rgba(255,255,255,.88);
  --native-selected: linear-gradient(135deg, rgba(255,255,255,.24), rgba(210,219,255,.08));
  --native-selected-rim: inset 0 1px 1px #fff, inset 0 0 0 1px rgba(255,255,255,.62), 0 5px 13px -10px rgba(59,76,176,.42);
  --native-sheet-base: rgba(231,237,252,.43);
  --native-opaque: #eaf0fb;
  --native-scrim: rgba(22,35,65,.18);
  --native-sheen: radial-gradient(ellipse at 18% 0%, rgba(255,255,255,.46), transparent 61%);
  --native-scroll-thumb: rgba(42,61,118,.40);
  --ws-glass: var(--native-glass);
  --ws-dock: var(--native-float);
  --ws-dock-selected: var(--native-selected);
  --ws-dock-rim: var(--native-rim);
  --ws-rim: var(--native-rim);
  --ws-edge: var(--native-edge);
}

:root[data-theme="dark"] {
  --native-glass: linear-gradient(135deg, rgba(83,96,129,.18), rgba(35,44,65,.12) 65%, rgba(70,77,114,.16));
  --native-float: linear-gradient(125deg, rgba(77,87,116,.24), rgba(31,38,57,.15) 52%, rgba(65,63,101,.18));
  --native-rim: 0 10px 30px -17px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.09);
  --native-header-tint: rgba(21,27,46,.74);
  --native-header-rim: inset 0 1px 0 rgba(255,255,255,.09);
  --native-edge: rgba(207,217,245,.15);
  --native-selected: linear-gradient(135deg, rgba(177,163,255,.13), rgba(190,207,250,.04));
  --native-selected-rim: inset 0 1px 0 rgba(255,255,255,.24), inset 0 0 0 1px rgba(195,185,255,.22), 0 5px 13px -10px rgba(0,0,0,.5);
  --native-sheet-base: rgba(21,27,46,.58);
  --native-opaque: #21283f;
  --native-scrim: rgba(5,8,20,.40);
  --native-sheen: radial-gradient(ellipse at 18% 0%, rgba(175,194,255,.17), transparent 61%);
  --native-scroll-thumb: rgba(189,201,246,.46);
}

:root[data-theme] body.lf-landing-workspace .phone-shell.demo-phone {
  --phone-bezel: 15px;
  --phone-status-height: 47px;
  aspect-ratio: 675 / 1384;
  padding: var(--phone-bezel);
  border: 0;
  border-radius: 17.8% / 9.1%;
  background: transparent;
  box-shadow: 0 22px 32px -23px #0a11264a;
}

:root[data-theme] body.lf-landing-workspace .phone-display {
  z-index: 1;
  border-radius: 0;
  clip-path: url(#lf-phone-screen-clip);
  box-shadow: none;
}

.lf-landing-workspace .ws-phone-hardware {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lf-landing-workspace .ws-phone-island {
  position: absolute;
  z-index: 2;
  top: 2.96%;
  left: 50%;
  width: 27.56%;
  height: 3.754%;
  transform: translateX(-50%);
  overflow: hidden;
  border-radius: 999px;
  pointer-events: none;
}

:root[data-theme] body.lf-landing-workspace .demo-status {
  height: var(--phone-status-height);
  padding-top: calc(var(--phone-status-height) * .15);
  font-size: clamp(9px, calc(var(--phone-status-height) * .24), 13px);
}

#trial .tg-social-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 3px 9px #17234b26, 0 8px 16px #17234b14;
}

#trial .tg-social-icon::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px #ffffff38, inset 0 1px 1px #ffffff54;
  pointer-events: none;
  content: "";
}

#trial .tg-social-icon > svg { display: block; width: 28px; height: 28px; }
#trial .tg-social-icon > img { display: block; width: 100%; height: 100%; object-fit: cover; }
#trial .tg-social-gift { background: linear-gradient(145deg, #7468f7, #4433bb); }
#trial .tg-social-telegram { background: linear-gradient(145deg, #29b9ee, #057ab6); }
#trial .tg-social-miniapp { background: #10274e; }
#trial .tg-social-instagram {
  background: radial-gradient(ellipse at 27% 104%, #ffce6c 4%, #f57b42 23%, #d92b73 53%, #7834bd 76%, #3e48cb 100%);
}
#trial .tg-social-tiktok { background: linear-gradient(145deg, #2c3040, #101116 72%); }
#trial .tg-gift-action-icon > svg { display: block; width: 21px; height: 21px; }

[data-theme="dark"] #trial .tg-social-icon { box-shadow: 0 3px 9px #0006, 0 8px 16px #0003; }

:root[data-theme] body :is(.client-card, .price-card, .feature-panel, .purchase-entry, .tg-glass, .about-card, .setup-step, .cab-glass, .cab-login-form, .cab-invoice, .cab-term, .dock-card:not(.dock-primary)) {
  background: var(--native-glass);
  border-color: var(--native-edge);
  box-shadow: var(--native-rim);
  -webkit-backdrop-filter: blur(3px) saturate(100%);
  backdrop-filter: blur(3px) saturate(100%);
}

/* Override the legacy full-width glass, including its accessibility fallback. */
:root[data-theme] body .header {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

:root[data-theme] body .header > .header-row {
  --header-radius: 22px;
  position: relative;
  z-index: 0;
  border-color: var(--native-edge);
  border-radius: var(--header-radius);
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

:root[data-theme] body .header > .header-row::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  clip-path: inset(0 round calc(var(--header-radius) - 1px));
  background: var(--native-float) var(--native-header-tint);
  box-shadow: var(--native-header-rim);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
  content: "";
}

@media (max-width: 760px) {
  :root[data-theme] body .header > .header-row { --header-radius: 19px; }
}

:root[data-theme] body :is(.cab-nav, #mobileMenu, .ws-phone-controls > [role="group"]) {
  background: var(--native-float);
  border-color: var(--native-edge);
  box-shadow: var(--native-rim);
  -webkit-backdrop-filter: blur(2px) saturate(100%);
  backdrop-filter: blur(2px) saturate(100%);
}

:root[data-theme] body :is(.cab-nav button[aria-current="page"], .ws-segment button[aria-pressed="true"], .cab-term[aria-pressed="true"]) {
  background: var(--native-selected);
  border-color: var(--native-edge);
  box-shadow: var(--native-selected-rim);
  color: var(--accent);
}

.lf-landing-workspace .setup-steps {
  gap: 10px;
}

:root[data-theme] body .setup-step {
  align-items: flex-start;
  gap: 14px;
  padding: 16px clamp(13px, 2vw, 20px);
  border: 1px solid var(--native-edge);
  border-radius: 18px;
  color: var(--ink);
}

:root[data-theme] body .setup-step[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--native-selected) var(--accent-soft);
}

.lf-landing-workspace .setup-step > span {
  display: grid;
  flex: 0 0 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.lf-landing-workspace .setup-step div { padding-top: 3px; }
.lf-landing-workspace .setup-step p { margin-top: 4px; line-height: 1.55; }
.lf-landing-workspace .setup-step > i {
  flex: none;
  font-size: 16px;
  line-height: 30px;
  opacity: .56;
  transform: none;
}

:root[data-theme] body.lf-landing-workspace .ws-phone-controls > [role="group"] {
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--native-edge);
  border-radius: 999px;
}

.lf-landing-workspace .ws-phone-controls button {
  min-height: 36px;
  padding: 5px clamp(9px, 2.4vw, 12px);
  border-radius: 999px;
}

:root[data-theme] body .ws-phone-controls button[aria-pressed="true"] {
  background: var(--native-selected) var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--native-edge);
  color: var(--accent);
  font-weight: 650;
}

.lf-landing-workspace :is(.setup-step, .ws-phone-controls button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:root[data-theme] body .cab-term[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--native-selected) var(--accent-soft);
}

:root[data-theme] body :is(.panel-dialog[open], .cab-modal[open]) {
  background: var(--native-sheen), var(--native-glass) var(--native-sheet-base);
  border-color: var(--native-edge);
  box-shadow: var(--native-rim), 0 24px 72px -38px rgba(10,19,49,.62);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
}

:root[data-theme] body :is(.panel-dialog, .cab-modal)::backdrop {
  background: var(--native-scrim);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.lf-workspace .cab-modal[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lf-workspace .cab-modal::before,
.lf-workspace .cab-modal-head {
  flex: none;
}
.lf-workspace .cab-modal-scroll {
  min-height: 0;
  overflow: hidden auto;
  overscroll-behavior-y: contain;
  padding-inline: 8px;
  margin-inline: -8px;
  scrollbar-width: thin;
  scrollbar-color: var(--native-scroll-thumb) transparent;
}
.lf-workspace .cab-modal-scroll::-webkit-scrollbar { width: 6px; }
.lf-workspace .cab-modal-scroll::-webkit-scrollbar-track { background: transparent; }
.lf-workspace .cab-modal-scroll::-webkit-scrollbar-thumb {
  background: var(--native-scroll-thumb);
  border-radius: 999px;
}
.lf-workspace .cab-modal-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 8px;
}
.lf-workspace .cab-modal h2 { overflow-wrap: anywhere; }
.lf-workspace .ws-sheet-actions .cab-button { margin-top: 0; }

:root[data-theme] body .cab-glass.ws-referral-panel {
  background-image: var(--native-sheen), var(--native-glass);
}
.lf-workspace .ws-form-panel > h2 {
  letter-spacing: -.01em;
  line-height: 1.3;
}

.demo-placeholder {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
  color: var(--ink);
  background: var(--native-glass) var(--native-opaque);
}
.demo-placeholder button {
  border: 1px solid var(--native-edge);
  border-radius: 16px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  background: var(--native-selected);
  box-shadow: var(--native-selected-rim);
}
.demo-placeholder button:enabled { cursor: pointer; }
.demo-placeholder button:disabled { opacity: .55; }
.demo-placeholder p { margin: 0; font-size: 13px; line-height: 1.5; }
.demo-placeholder p:empty { display: none; }
[data-demo-state="ready"] .demo-placeholder { display: none; }

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  :root[data-theme] body :is(.header > .header-row, .cab-nav, #mobileMenu, .ws-phone-controls > [role="group"], .panel-dialog[open], .cab-modal[open]) {
    background-color: var(--native-opaque);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root[data-theme] body .header > .header-row::before {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  :root[data-theme] body :is(.header > .header-row, .cab-nav, #mobileMenu, .ws-phone-controls > [role="group"], .panel-dialog[open], .cab-modal[open], .client-card, .price-card, .feature-panel, .purchase-entry, .tg-glass, .about-card, .setup-step, .cab-glass, .cab-login-form, .cab-invoice, .cab-term, .dock-card:not(.dock-primary)) {
    background-color: var(--native-opaque);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
