/* =========================================================
   Deay Bypass — top-up page
   ========================================================= */
/* hidden ต้องชนะ display ของคอมโพเนนต์ (เช่น flex) */
#topup [hidden] { display: none !important; }
.tu-wrap { max-width: 860px; }
.tu-panel { padding: 26px 30px 30px; }

/* tabs */
.tu-tabs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px;
  margin-bottom: 20px; padding: 5px; border-radius: 12px;
  border: 1px solid var(--line); background: #0b0c0f;
}
.tu-tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: background .2s, color .2s;
}
.tu-tabs button svg { width: 17px; height: 17px; }
.tu-tabs button:hover { color: var(--text-2); background: rgba(255, 255, 255, .04); }
.tu-tabs button.on { color: #fff; background: #1c1d22; box-shadow: inset 0 0 0 1px var(--line-2); }

/* content */
.tu-video { aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 16px; border-radius: 14px; border: 1px solid var(--line); background: #000; }
.tu-video iframe, .tu-video video { display: block; width: 100%; height: 100%; border: 0; }
.tu-note { margin-bottom: 16px; font-size: 14.5px; line-height: 1.7; color: var(--muted); white-space: pre-line; }
.tu-note:empty { display: none; }
.tu-kicker { margin-bottom: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; color: var(--dim); }
.tu-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tu-store {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; border-radius: 12px; text-align: center;
  border: 1px solid var(--line); background: #0e0f12;
  transition: border-color .2s, transform .2s;
}
.tu-store:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tu-store-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--c, var(--accent)); color: #fff; font-size: 14px; font-weight: 800; }
.tu-store b { font-size: 14.5px; }
.tu-store small { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; background: rgba(99, 102, 241, .2); color: #c7d2fe; }

.tu-label { display: block; margin: 4px 0 8px; font-size: 14px; font-weight: 600; }
.tu-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: #0a0b0e; color: var(--text);
  font: inherit; font-size: 14.5px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.tu-input:focus { border-color: rgba(129, 140, 248, .7); box-shadow: 0 0 0 4px rgba(99, 102, 241, .16); }
.tu-input.invalid { border-color: rgba(248, 113, 113, .7); }
.tu-input:disabled { opacity: .55; }
.tu-address {
  display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; padding: 12px;
  border-radius: 12px; border: 1px dashed var(--line-2); background: #0c0d10;
}
.tu-qr { width: 84px; height: 84px; flex: none; border-radius: 8px; background: #fff; object-fit: contain; }
.tu-address-body { flex: 1; min-width: 0; }
.tu-address-body small { display: block; font-size: 12px; color: var(--dim); }
.tu-address-body code { display: block; margin-top: 2px; font-family: var(--mono); font-size: 13.5px; word-break: break-all; color: var(--text); }
.tu-address.empty code { color: #fca5a5; font-family: inherit; }
.tu-copy { flex: none; padding: 9px 11px; }
.tu-copy svg { width: 17px; height: 17px; }
.tu-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; }

.tu-msg { min-height: 20px; margin: 10px 0 2px; font-size: 13.5px; color: #f87171; }
.tu-accept { margin: 6px 0 14px; }
.tu-submit { width: 100%; }
.tu-submit .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: tuSpin .7s linear infinite; }
.tu-submit.loading { pointer-events: none; opacity: .85; }
.tu-submit.loading .spinner { display: inline-block; }

/* login gate + done */
.tu-gate {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-bottom: 18px; padding: 22px; border-radius: 14px; text-align: center;
  border: 1px solid rgba(99, 102, 241, .35); background: rgba(99, 102, 241, .08); color: var(--text-2);
}
.tu-gate .btn svg { width: 18px; height: 18px; }
.tu-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 10px 10px; text-align: center; animation: popIn .35s ease; }
.tu-done-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .12); color: #fbbf24; }
.tu-done-icon svg { width: 28px; height: 28px; }
.tu-done h2 { font-size: 22px; font-weight: 700; }
.tu-done p { max-width: 440px; color: var(--muted); }
.tu-done-ref b { font-family: var(--mono); color: var(--text); }
.tu-done .btn { margin-top: 8px; }

@keyframes tuSpin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .tu-panel { padding: 18px; }
  .tu-tabs button { flex-direction: column; gap: 5px; padding: 10px 4px; font-size: 12.5px; line-height: 1.3; text-align: center; }
  .tu-tabs button svg { width: 18px; height: 18px; }
  .tu-row { grid-template-columns: 1fr; }
  .tu-address { flex-wrap: wrap; }
}
