/* Transfer to mobile — button + QR popover */

.main-content .header { position: relative; }

.ttm-btn {
  --ttm-angle: 0deg;   /* ring rotation, driven by transfer-to-mobile.js */
  --ttm-energy: 0;     /* 0..1 spin speed, drives the glow */
  --ttm-ring: conic-gradient(from var(--ttm-angle), #ff9f43, #ff5f7e, #8b5cf6, #208eff, #22c1c3, #ff9f43);
  --ttm-fill: #fff;
  position: absolute;
  top: 13px;
  right: 74px;
  height: 40px;
  padding: 0 18px 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  isolation: isolate;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1c223e;
  font-family: inter_medium, sans-serif;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1);
}
/* gradient ring + fill */
.ttm-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1.5px solid transparent;
  border-radius: inherit;
  background:
    linear-gradient(var(--ttm-fill), var(--ttm-fill)) padding-box,
    var(--ttm-ring) border-box;
  transition: --ttm-fill 200ms ease;
}
/* soft glow that follows the ring, brightest while spinning fast */
.ttm-btn::after {
  content: "";
  position: absolute;
  inset: 3px 4px -3px;
  z-index: -2;
  border-radius: inherit;
  background: var(--ttm-ring);
  filter: blur(12px);
  opacity: calc(var(--ttm-energy) * .75);
  transform: scale(calc(.9 + var(--ttm-energy) * .1));
}
.ttm-btn:active { transform: scale(.96); }
.ttm-btn:focus-visible { outline: none; }
.ttm-btn:focus-visible::before { box-shadow: 0 0 0 3px rgba(32, 142, 255, .3); }
.ttm-btn[aria-expanded="true"] { --ttm-fill: #f5f7ff; }

.ttm-btn__icon { width: 16px; height: 16px; flex: none; color: #208eff; }
.ttm-btn__icon .ttm-wave { transform-origin: 70% 50%; }
.ttm-btn:hover .ttm-wave { animation: ttm-wave 1.2s ease-in-out infinite; }
.ttm-btn:hover .ttm-wave--2 { animation-delay: .15s; }
@keyframes ttm-wave {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}

/* Popover */
.ttm-pop {
  position: fixed;
  z-index: 1000;
  width: 320px;
  padding: 20px 20px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(28, 34, 62, .06),
    0 12px 32px -8px rgba(28, 34, 62, .22),
    0 4px 10px -4px rgba(28, 34, 62, .08);
  color: #3b3944;
  font-family: inter_regular, sans-serif;
  transform-origin: calc(100% - 40px) -8px;
  visibility: hidden;
  opacity: 0;
}
.ttm-pop[data-open] { visibility: visible; opacity: 1; }
.ttm-pop:focus { outline: none; }

.ttm-pop::before { /* caret */
  content: "";
  position: absolute;
  top: -6px;
  right: var(--ttm-caret, 34px);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: -1px -1px 0 0 rgba(28, 34, 62, .06);
}

.ttm-pop__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #959bb6;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.ttm-pop__close:hover { background: #f3f4f9; color: #5e6787; }
.ttm-pop__close:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(32, 142, 255, .4); }
.ttm-pop__close svg { width: 10px; height: 10px; fill: currentColor; }

.ttm-pop__title {
  margin: 0 32px 4px 0;
  font-family: inter_semibold, sans-serif;
  font-size: 16px;
  color: #1c223e;
}
.ttm-pop__sub {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b6f85;
}

.ttm-qr-card {
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #e9eef7;
  text-align: center;
}
.ttm-qr {
  position: relative;
  width: 196px;
  height: 196px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  box-sizing: content-box;
  overflow: hidden;
}
.ttm-qr svg { display: block; width: 100%; height: 100%; }
.ttm-qr__code { transition: filter 300ms ease, opacity 300ms ease; }
.ttm-qr__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #208eff;
  box-shadow: 0 0 0 4px #fff;
  color: #fff;
}
.ttm-qr__logo svg { width: 22px; height: 22px; fill: currentColor; }

/* shimmer while generating */
.ttm-qr[data-state="loading"] .ttm-qr__code { opacity: 0; }
.ttm-qr[data-state="loading"]::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 6px;
  background: linear-gradient(100deg, #f1f4f9 30%, #e3e8f1 50%, #f1f4f9 70%) 0 0 / 300% 100%;
  animation: ttm-shimmer 1s linear infinite;
}
@keyframes ttm-shimmer { to { background-position: -150% 0; } }

/* expired */
.ttm-qr[data-state="expired"] .ttm-qr__code,
.ttm-qr[data-state="expired"] .ttm-qr__logo { filter: blur(5px); opacity: .35; }
.ttm-qr__expired {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}
.ttm-qr[data-state="expired"] .ttm-qr__expired { opacity: 1; pointer-events: auto; }
.ttm-qr__expired span { font-family: inter_medium, sans-serif; font-size: 13px; color: #1c223e; }
.ttm-regen {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #208eff;
  color: #fff;
  font-family: inter_medium, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}
.ttm-regen:hover { background: #0779e4; }
.ttm-regen:active { transform: scale(.96); }

.ttm-qr-card__cap {
  margin-top: 10px;
  font-family: inter_medium, sans-serif;
  font-size: 13px;
  color: #1c223e;
}

.ttm-steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ttm-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 20px;
  color: #3b3944;
}
.ttm-steps b {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf4ff;
  color: #208eff;
  font-family: inter_semibold, sans-serif;
  font-size: 11px;
  font-weight: normal;
}

.ttm-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eef0f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #6b6f85;
}
.ttm-timer { font-variant-numeric: tabular-nums; }
.ttm-timer[data-low] { color: #e5484d; }
.ttm-link {
  padding: 0;
  border: 0;
  background: none;
  color: #208eff;
  font: inherit;
  font-family: inter_medium, sans-serif;
  cursor: pointer;
}
.ttm-link:hover { text-decoration: underline; }

@property --ttm-fill { syntax: "<color>"; inherits: true; initial-value: #fff; }

@media (prefers-reduced-motion: reduce) {
  .ttm-btn, .ttm-btn:hover .ttm-wave, .ttm-qr[data-state="loading"]::after { transition: none; animation: none; }
}
