.vpn-access-entry { margin-top: 24px; }
.vpn-access .vpn-access-primary[hidden],
.vpn-access [hidden] { display: none; }

.vpn-access {
  --access-ice: #65ecff;
  --access-pink: #ff84d6;
  --access-ink: #090e17;
  width: min(568px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 1px;
  border: 0;
  border-radius: 23px;
  background: linear-gradient(130deg, #85eeff, #2d4d69 40%, #73456b 74%, #f7a4e5);
  color: #f6f9ff;
  box-shadow: 0 28px 95px #000b, 0 0 40px #4bd7ff24;
  overflow: auto;
  overscroll-behavior: contain;
}

.vpn-access[open] { animation: vpn-access-enter .38s cubic-bezier(.2, .88, .3, 1) both; }
.vpn-access::backdrop {
  background: rgb(2 5 11 / .77);
  backdrop-filter: blur(9px);
  animation: vpn-access-backdrop .28s ease both;
}
body:has(.vpn-access[open]) { overflow: hidden; }

.vpn-access-surface {
  border-radius: 22px;
  padding: clamp(20px, 5vw, 37px);
  background:
    radial-gradient(ellipse at 2% 2%, #234b615c, transparent 54%),
    radial-gradient(ellipse at 100% 0%, #62284b40, transparent 42%),
    #101625;
}
.vpn-access-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.vpn-access-header img { filter: drop-shadow(0 0 10px #43def657); }
.vpn-access-dismiss {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #54637b80;
  border-radius: 12px;
  background: #101523c9;
  color: #f6f9ff;
  font: 28px/1 system-ui;
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.vpn-access h2 { font-size: clamp(30px, 6vw, 46px); line-height: 1.05; letter-spacing: -.05em; }
.vpn-access h2 span {
  color: var(--access-ice);
  background: linear-gradient(105deg, #f8fcff, #6eecff 68%, #ffc0e8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.vpn-access #request-intro { margin-top: 10px; color: #b7c7db; max-width: 39ch; }
.vpn-access form, .vpn-access #request-receipt { margin-top: 24px; }
.vpn-access form > label, .vpn-access-grid, .vpn-access #request-code { margin-bottom: 15px; }
.vpn-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vpn-access label { display: block; color: #e6edfa; font-weight: 680; font-size: 13px; }
.vpn-access input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  margin-top: 6px;
  padding: 9px 13px;
  border-radius: 11px;
  border: 1px solid #465774;
  background: #0b101d;
  color: #f6f9ff;
  font: inherit;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.vpn-access :is(button, a, input):focus-visible, .vpn-access-trigger:focus-visible { outline: 2px solid #77edff; outline-offset: 3px; }
.vpn-access input:focus { border-color: var(--access-ice); box-shadow: 0 0 18px #65ecff20; }
.vpn-access #request-code { max-width: 176px; font-variant-numeric: tabular-nums; letter-spacing: .22em; }
.vpn-access-small { margin-bottom: 15px; font-size: 13px; color: #b7c7db; }

.vpn-access .vpn-access-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  padding: 11px 20px;
  border: 1px solid #b5f7ff;
  border-radius: 13px;
  color: var(--access-ink);
  background: linear-gradient(112deg, #55dfff, #bff9ff 45%, #dbecff 68%, #f6a8e1);
  background-size: 190% 100%;
  box-shadow: 0 0 0 1px #8df3ff2a, 0 7px 27px #4dd9ff37;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .24s, background-position .45s, box-shadow .24s;
  animation: vpn-access-pulse 2.8s ease-in-out infinite;
}
.vpn-access-primary:disabled { opacity: .67; animation: none; cursor: wait; }
.vpn-access-primary:active:not(:disabled) { transform: translateY(1px); }
.vpn-access-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid #4b5c77;
  border-radius: 10px;
  background: #141d2e;
  color: #dbebff;
  font: inherit;
  font-size: 13px;
  font-weight: 660;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.vpn-access #request-vedar, .vpn-access #request-edit { margin-top: 11px; }
.vpn-access-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.vpn-access-state {
  text-align: center;
  padding: 23px 15px;
  border: 1px solid #435877;
  border-radius: 15px;
  background: radial-gradient(ellipse at 50% 0%, #23708e38, transparent 65%), #0b1220;
}
.vpn-access-state h3 { margin-bottom: 7px; color: #f6f9ff; font-size: clamp(20px, 4vw, 25px); letter-spacing: -.028em; }
.vpn-access-state h3[data-state="approved"] { color: var(--access-ice); }
.vpn-access-state h3[data-state="rejected"] { color: var(--access-pink); }
.vpn-access-state p { margin-inline: auto; max-width: 35ch; color: #bfcbdf; font-size: 14px; }
.vpn-access-signal { display: flex; height: 26px; gap: 7px; justify-content: center; align-items: center; margin-bottom: 7px; }
.vpn-access-signal i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--access-ice);
  box-shadow: 0 0 12px currentColor;
  animation: vpn-access-signal 1.25s ease-in-out infinite;
}
.vpn-access-signal i:nth-child(2) { background: white; animation-delay: .13s; }
.vpn-access-signal i:nth-child(3) { background: var(--access-pink); animation-delay: .26s; }
.vpn-access #request-feedback { margin-top: 13px; color: #a4efff; font-size: 14px; }
.vpn-access #request-feedback[data-tone="error"] { color: #ffabd1; }
.help .vpn-access-trigger { color: #090e17; }

@media (hover: hover) {
  .vpn-access-primary:hover:not(:disabled) { background-position: 100%; transform: translateY(-2px); }
  .vpn-access :is(.vpn-access-secondary, .vpn-access-dismiss):hover { color: white; border-color: var(--access-ice); background: #233750; }
}
@media (max-width: 390px) {
  .vpn-access-grid { grid-template-columns: 1fr; }
  .vpn-access-header { margin-bottom: 14px; }
}

@keyframes vpn-access-enter {
  from { opacity: 0; transform: translateY(19px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes vpn-access-backdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes vpn-access-pulse {
  0%, 100% { box-shadow: 0 0 0 1px #8df3ff2a, 0 7px 22px #4dd9ff32; }
  50% { box-shadow: 0 0 0 1px #c2f7ff70, 0 7px 34px #90deff73; }
}
@keyframes vpn-access-signal {
  0%, 60%, 100% { opacity: .55; transform: translateY(3px) scale(.8); }
  30% { opacity: 1; transform: translateY(-3px) scale(1.13); }
}
@media (prefers-reduced-motion: reduce) {
  .vpn-access, .vpn-access::backdrop, .vpn-access *, .vpn-access *::before { animation: none !important; transition: none !important; }
}
