/* The Activate eSIM button with the signal filling up: a small dark glass card of a made-up travel eSIM app on pure
   black. The card is its own material (a faint teal light inside the glass, a 1px edge that is brighter on top, fine
   grain, three layers of shadow); the button is a light pill; the SIM next to it is drawn in SVG. */
:root {
  --page: #000000;            /* the page */
  --glass: #0e1112;           /* the body of the card */
  --edge: rgba(255, 255, 255, 0.09); /* the card's edge */
  --ink: #eef2f1;             /* the words */
  --muted: #8a9592;           /* the small words */
  --faint: rgba(255, 255, 255, 0.12); /* empty signal bars and rules */
  --accent: #35e0c2;          /* the one colour: signal, active, glow */
  --pill: #f1f4f3;            /* the button */
  --pill-ink: #07100e;        /* the words on the button */
  --gold: #6e5a34;            /* the SIM contacts before they light up */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- the card */
.esim {
  --mx: 30%;
  --my: 0%;
  position: relative;
  width: min(384px, 90vw);
  padding: clamp(16px, 4.6vh, 22px) clamp(16px, 5vw, 22px) clamp(16px, 4.6vh, 20px);
  border-radius: 24px;
  isolation: isolate;
  background:
    radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012) 45%, rgba(255, 255, 255, 0)),
    var(--glass);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 0 0 1px var(--edge),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 1px 1px rgba(0, 0, 0, 0.6),
    0 10px 24px -8px rgba(0, 0, 0, 0.8),
    0 40px 80px -30px color-mix(in srgb, var(--accent) 16%, transparent);
  opacity: 0;
}

.esim__grain,
.esim__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.esim__grain {
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* a soft light inside the glass that follows the pointer, and brightens when the eSIM connects */
.esim__glow {
  opacity: 0.5;
  background: radial-gradient(220px 160px at var(--mx) var(--my), rgba(255, 255, 255, 0.05), transparent 70%);
}

.esim__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.brand__mark {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.9;
  stroke-linecap: round;
}

.brand__name {
  font-size: 14px;
  font-weight: 620;
  font-variation-settings: 'wdth' 106;
  letter-spacing: 0.005em;
}

.chip {
  font-size: 11px;
  font-weight: 520;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.plan {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(12px, 3.6vh, 20px);
}

.plan__country {
  margin: 0;
  font-size: clamp(26px, min(8.4vw, 8vh), 32px);
  line-height: 1;
  font-weight: 640;
  font-variation-settings: 'wdth' 104;
  letter-spacing: -0.025em;
}

.plan__what {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.plan__price {
  margin: 0;
  font-size: clamp(24px, min(7.6vw, 7.4vh), 30px);
  line-height: 1;
  font-weight: 600;
  font-variation-settings: 'wdth' 96;
  letter-spacing: -0.03em;
}

.plan__cur {
  font-size: 0.58em;
  vertical-align: 0.62em;
  margin-right: 1px;
  color: var(--muted);
  font-weight: 520;
}

.esim__rule {
  position: relative;
  display: block;
  height: 1px;
  margin: clamp(12px, 3.4vh, 18px) 0 clamp(10px, 3vh, 14px);
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

/* a thin light that runs along the rule when the eSIM connects */
.esim__rule-lit {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
}

/* ---------------------------------------------------------------- status: bars, words, data left */
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 20px;
}

.bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  flex: none;
}

.bar {
  position: relative;
  width: 4px;
  border-radius: 1.5px;
  background: var(--faint);
  overflow: visible;
}

.bar:nth-child(1) { height: 5px; }
.bar:nth-child(2) { height: 8px; }
.bar:nth-child(3) { height: 11px; }
.bar:nth-child(4) { height: 14px; }

.bar__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 60%, #ffffff), var(--accent));
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 45%, transparent);
  transform-origin: 50% 100%;
  transform: scaleY(0);
}

.status__words {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.status__label {
  display: inline-block;
  font-size: 13px;
  font-weight: 520;
  color: var(--muted);
  font-variation-settings: 'wdth' 100;
}

/* the shimmer that runs over Searching */
.status__label.is-busy {
  background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 35%, #ffffff 50%, var(--muted) 65%, var(--muted) 100%);
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status__label.is-on {
  color: var(--ink);
}

.left {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex: none;
  font-size: 13px;
  font-weight: 560;
  color: var(--muted);
}

.odo {
  display: inline-flex;
  height: 1.2em;
  line-height: 1.2em;
  overflow: hidden;
  color: inherit;
  font-feature-settings: 'tnum' 0;
}

.odo__col {
  display: inline-block;
  width: 0.62em;
  height: 1.2em;
  overflow: hidden;
  text-align: center;
}

.odo__col--tens {
  width: 0;
}

.odo__strip {
  display: block;
}

.odo__strip span {
  display: block;
  height: 1.2em;
}

.odo__dot {
  width: 0.26em;
  text-align: center;
}

.left__unit {
  font-weight: 500;
}

/* ---------------------------------------------------------------- the action row: SIM and pill */
.act {
  position: relative;
  height: 56px;
  margin-top: clamp(12px, 3.4vh, 16px);
}

.sim {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 40px;
  height: 52px;
  opacity: 0;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
}

.sim__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sim__body {
  fill: url(#simBody);
}

.sim__edge {
  fill: none;
  stroke: url(#simEdge);
  stroke-width: 1;
}

.sim__chip {
  fill: #3a3121;
}

.pad {
  fill: var(--gold);
}

.sim__lit rect {
  fill: url(#padLit);
  opacity: 0;
}

.sim__trace {
  fill: none;
  stroke: #fff4cf;
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.9;
}

.sim__notch {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.pill {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pill-ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.pill__skin {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, var(--pill) 60%, #dfe5e3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 8px 20px -8px rgba(0, 0, 0, 0.8);
  transition: box-shadow 0.4s ease;
}

/* the accent that floods the pill when the eSIM is active */
.pill__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #ffffff), var(--accent) 70%);
  opacity: 0;
}

.pill__sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  opacity: 0;
}

.pill__face {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  white-space: nowrap;
}

.pill__icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.pill__check {
  stroke-width: 1.9;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.pill__words {
  font-size: 15px;
  font-weight: 620;
  font-variation-settings: 'wdth' 100;
  transition: font-variation-settings 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .pill:hover .pill__words {
    font-variation-settings: 'wdth' 114;
  }

  .pill:hover .pill__skin {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 1px 2px rgba(0, 0, 0, 0.5),
      0 12px 26px -8px rgba(0, 0, 0, 0.9),
      0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
  }
}
