/* Slip top-up only. LINESeed faces are already registered by app.css. */
.fx-account.fx-topup {
  --fx-topup-text: #f2f1f3;
  --fx-muted: #a8a8b1;
  --fx-fill: #111113;
  --fx-tint: #18181b;
  --fx-line: #2b2b30;
  --fx-control: #515158;
  --fx-positive: #67d3a9;
  --fx-danger: #ffa8b0;
  --fx-topup-well: #101012;
  --fx-topup-hover: #27272b;
  --fx-topup-icon: #a1a1aa;
  --fx-topup-focus: #b9b9c3;
  --fx-topup-bank: #49be95;
  --fx-topup-gift: #ff9e60;
  --fx-topup-code: #f5ae55;
  --fx-topup-envelope: #ed7160;
  --fx-topup-envelope-detail: #511e17;
  --fx-topup-envelope-bg: #291c17;
  --fx-topup-amber: #f4cb73;
  --fx-topup-amber-line: #5c4523;
  --fx-topup-amber-bg: #211b13;
  --fx-topup-primary: #d6d5d8;
  --fx-topup-primary-hover: #e9e8eb;
  --fx-topup-on-primary: #171719;
  --fx-topup-disabled: #3a3a3e;
  --fx-topup-pad: clamp(16px, 4.8vw, 24px);
  --fx-topup-radius: 16px;
  grid-template-columns: minmax(0, 1fr);
  max-width: 900px;
  padding: clamp(24px, 5.7vw, 42px) clamp(14px, 3.8vw, 24px) clamp(48px, 11vw, 84px);
  gap: 14px;
  color: var(--fx-topup-text);
  color-scheme: dark;
  line-height: 1.45;
}

html.light .fx-account.fx-topup {
  --fx-topup-text: #222229;
  --fx-muted: #555563;
  --fx-fill: #fff;
  --fx-tint: #f3f3f6;
  --fx-line: #d9d9e0;
  --fx-control: #888895;
  --fx-positive: #17664b;
  --fx-danger: #982935;
  --fx-topup-well: #fff;
  --fx-topup-hover: #e7e7ed;
  --fx-topup-icon: #5d5d69;
  --fx-topup-focus: #555565;
  --fx-topup-bank: #167059;
  --fx-topup-gift: #a34216;
  --fx-topup-code: #96540c;
  --fx-topup-envelope: #b64d3c;
  --fx-topup-envelope-detail: #fff1e8;
  --fx-topup-envelope-bg: #fbefe8;
  --fx-topup-amber: #734507;
  --fx-topup-amber-line: #d5b57e;
  --fx-topup-amber-bg: #fff6e3;
  --fx-topup-primary: #303039;
  --fx-topup-primary-hover: #464651;
  --fx-topup-on-primary: #fff;
  --fx-topup-disabled: #e7e7ec;
  color-scheme: light;
}

#app .fx-topup { color: var(--fx-topup-text); }
.fx-topup,
.fx-topup * { font-family: LINESeed, 'LINE Seed Sans TH', system-ui, sans-serif; }
.fx-topup [hidden] { display: none !important; }
.fx-topup .fx-topup__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.fx-topup .fx-topup__icon {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  pointer-events: none;
}
.fx-topup :is(.fx-topup__welcome, .fx-topup__panel, .fx-topup__history, .fx-topup__trust) {
  min-width: 0;
  padding: var(--fx-topup-pad);
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-topup-radius);
  background: var(--fx-fill);
}
.fx-topup .fx-topup__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--fx-line);
}
.fx-topup .fx-topup__heading > div { flex: 1 1 28rem; }
.fx-topup .fx-topup__heading h1 {
  margin-bottom: 5px;
  font-size: clamp(1.5rem, 5.8vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
}
.fx-topup .fx-topup__heading p { max-width: 62ch; color: var(--fx-muted); font-size: .875rem; }
.fx-topup .fx-account__button {
  border-color: var(--fx-line);
  background: var(--fx-tint);
  color: inherit;
  font-size: .875rem;
  font-weight: 400;
  transition: background-color .15s ease, border-color .15s ease;
}
.fx-topup .fx-topup__history-button { background: var(--fx-fill); }
.fx-topup .fx-topup__history-button .fx-topup__icon { color: var(--fx-topup-icon); }
.fx-topup .fx-topup__history-button[aria-expanded="true"] { background: var(--fx-topup-hover); }
.fx-topup .fx-topup__history {
  display: grid;
  gap: 16px;
  scroll-margin-block-start: calc(var(--fx-header-height, 64px) + 12px);
}
.fx-topup .fx-topup__history .fx-account__records li { background: var(--fx-tint); }
.fx-topup .fx-topup__identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fx-topup .fx-topup__identity > div { min-width: 0; color: var(--fx-muted); font-size: .875rem; }
.fx-topup .fx-topup__username { color: var(--fx-topup-text); font-size: 1.0625rem; }
.fx-topup .fx-topup__avatar {
  position: relative;
  display: grid;
  flex: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f4f4f5;
  color: #212125;
}
.fx-topup .fx-topup__avatar .fx-topup__icon { width: 36px; height: 36px; }
.fx-topup .fx-topup__avatar::after {
  content: '';
  position: absolute;
  inset: auto 0 0 auto;
  width: 12px;
  height: 12px;
  border: 2px solid var(--fx-fill);
  border-radius: 50%;
  background: #23b987;
}
.fx-topup .fx-topup__wallet {
  margin-top: 15px;
  padding: 14px 15px;
  border: 1px solid var(--fx-line);
  border-radius: 12px;
  background: var(--fx-tint);
}
.fx-topup .fx-topup__wallet dt { display: flex; gap: 6px; align-items: center; }
.fx-topup .fx-topup__wallet .fx-topup__icon { width: 1rem; height: 1rem; color: var(--fx-topup-icon); }
.fx-topup .fx-topup__wallet dd { margin-top: 3px; line-height: 1.25; }
.fx-topup .fx-topup__balance { font-size: clamp(1.625rem, 6vw, 2rem); }
.fx-topup .fx-topup__currency { color: var(--fx-muted); font-size: .875rem; }

.fx-topup .fx-topup__methods > p { margin: 0 3px 6px; color: var(--fx-muted); font-size: .875rem; }
.fx-topup .fx-topup__tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--fx-line);
  border-radius: 10px;
  background: var(--fx-tint);
}
.fx-topup .fx-topup__tabs button {
  display: flex;
  min-height: 44px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--fx-muted);
  background: transparent;
  font-size: .8125rem;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
.fx-topup .fx-topup__tabs .fx-topup__icon { width: .9375rem; height: .9375rem; }
.fx-topup .fx-topup__tabs button[aria-selected="true"] {
  border-color: var(--fx-line);
  color: var(--fx-topup-text);
  background: var(--fx-topup-hover);
}
.fx-topup [data-method="bank"][aria-selected="true"] svg { color: var(--fx-topup-bank); }
.fx-topup [data-method="gift"][aria-selected="true"] svg { color: var(--fx-topup-gift); }
.fx-topup [data-method="code"][aria-selected="true"] svg { color: var(--fx-topup-code); }

.fx-topup .fx-topup__panel { display: grid; gap: var(--fx-topup-pad); }
.fx-topup .fx-topup__panel-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--fx-line);
}
.fx-topup .fx-topup__panel-heading h2 { font-size: clamp(1rem, 4.45vw, 1.25rem); line-height: 1.3; font-weight: 400; }
.fx-topup .fx-topup__panel-heading p { margin-top: 2px; color: var(--fx-muted); font-size: .8125rem; }
.fx-topup .fx-topup__method-icon {
  display: grid;
  flex: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--fx-line);
  border-radius: 9px;
  background: var(--fx-tint);
  color: var(--fx-topup-icon);
}
.fx-topup .fx-topup__method-icon .fx-topup__icon { width: 23px; height: 23px; }
.fx-topup #fx-topup-panel-gift .fx-topup__method-icon { color: var(--fx-topup-envelope); background: var(--fx-topup-envelope-bg); }

.fx-topup .fx-account__pay { padding: 0; border: 0; background: none; gap: 7px; }
.fx-topup .fx-topup__bank-info { padding: 14px; border: 1px solid var(--fx-line); border-radius: 12px; background: var(--fx-tint); align-items: center; }
.fx-topup .fx-account__bank { gap: 10px; }
.fx-topup .fx-account__bank dd { font-weight: 400; }
.fx-topup .fx-topup__bank-key { padding: 9px 11px; border: 1px solid var(--fx-line); border-radius: 9px; background: var(--fx-topup-well); }
.fx-topup .fx-account__copy { flex-wrap: wrap; padding: 0; background: none; }
.fx-topup .fx-account__copy code { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.fx-topup .fx-account__qr { width: min(176px, 100%); margin-inline: auto; }
.fx-topup .fx-account__note { font-size: .875rem; }
.fx-topup .fx-topup__slip-form { justify-items: stretch; border: 0; padding: 0; gap: 12px; }
.fx-topup .fx-topup__slip-form h3 { font-size: .9375rem; font-weight: 400; }
.fx-topup .fx-topup__drop {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 174px;
  padding: 15px;
  border: 1px dashed var(--fx-control);
  border-radius: 12px;
  background: var(--fx-tint);
  text-align: center;
  cursor: pointer;
  font-size: .875rem;
}
.fx-topup .fx-topup__drop:focus-within { outline: 2px solid var(--fx-topup-focus); outline-offset: 2px; }
.fx-topup .fx-topup__drop.is-dragover { background: var(--fx-topup-hover); border-color: var(--fx-topup-bank); }
.fx-topup .fx-topup__upload-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin-bottom: 4px; background: var(--fx-topup-hover); color: var(--fx-topup-icon); }
.fx-topup .fx-topup__upload-icon .fx-topup__icon { width: 23px; height: 23px; }
.fx-topup .fx-topup__clear { justify-self: start; }
.fx-topup .fx-account__slip-preview { justify-self: center; }
.fx-topup .fx-topup__callout { display: flex; align-items: flex-start; gap: 8px; padding: 11px 12px; border: 1px solid var(--fx-line); border-radius: 9px; background: var(--fx-tint); color: var(--fx-muted); font-size: .875rem; }
.fx-topup .fx-topup__callout strong { color: var(--fx-topup-text); }
.fx-topup .fx-topup__callout--amber { background: var(--fx-topup-amber-bg); border-color: var(--fx-topup-amber-line); color: var(--fx-topup-amber); }
.fx-topup .fx-topup__submit { width: 100%; min-height: 48px; border-radius: 9px; font-size: 1rem; }
.fx-topup .fx-topup__submit.fx-account__button--primary { background: var(--fx-topup-primary); color: var(--fx-topup-on-primary); border-color: transparent; }
.fx-topup .fx-topup__submit:disabled { background: var(--fx-topup-disabled); color: var(--fx-muted); opacity: 1; }
.fx-topup .fx-topup__voucher-form { display: grid; gap: 12px; min-width: 0; }
.fx-topup .fx-topup__voucher-form [data-voucher-notice][data-kind="warning"] { color: var(--fx-topup-amber); }
.fx-topup .fx-topup__voucher-form [data-action="voucher-status"] { justify-self: start; }
.fx-topup .fx-topup__field { display: grid; gap: 6px; min-width: 0; font-size: .9375rem; }
.fx-topup .fx-topup__input-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; min-width: 0; padding: 4px; background: var(--fx-topup-well); border: 1px solid var(--fx-line); border-radius: 9px; }
.fx-topup .fx-topup__input-group input { width: 100%; min-width: 0; min-height: 44px; padding: 6px 7px; border: 0; border-radius: 5px; background: transparent; color: inherit; font-size: 16px; }
.fx-topup input::placeholder { color: var(--fx-muted); opacity: 1; }
.fx-topup .fx-topup__small { color: var(--fx-muted); font-size: .8125rem; }
.fx-topup .fx-topup__details { border: 1px solid var(--fx-line); border-radius: 9px; background: var(--fx-tint); font-size: .875rem; }
.fx-topup .fx-topup__details summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; min-height: 44px; cursor: pointer; list-style: none; }
.fx-topup summary::-webkit-details-marker { display: none; }
.fx-topup .fx-topup__details[open] summary svg { transform: rotate(180deg); }
.fx-topup .fx-topup__details p { padding: 0 11px 11px; color: var(--fx-muted); }
.fx-topup .fx-topup__trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding-inline: 8px; list-style: none; text-align: center; }
.fx-topup .fx-topup__trust li { display: grid; justify-items: center; align-content: start; gap: 2px; font-size: .75rem; }
.fx-topup .fx-topup__trust strong { font-size: .8125rem; font-weight: 400; }
.fx-topup .fx-topup__trust :is(span, svg) { color: var(--fx-muted); }
.fx-topup .fx-topup__trust svg { margin-bottom: 3px; }
.fx-topup :is(button, input, summary, [tabindex]):focus-visible { outline: 2px solid var(--fx-topup-focus); outline-offset: 2px; }
.fx-topup .fx-topup__input-group input:focus-visible { outline-offset: -2px; }
@media (hover: hover) {
  .fx-topup :is(.fx-account__button, .fx-topup__tabs button):not(:disabled):hover, .fx-topup .fx-topup__drop:hover { background: var(--fx-topup-hover); border-color: var(--fx-control); }
  .fx-topup .fx-topup__submit.fx-account__button--primary:not(:disabled):hover { background: var(--fx-topup-primary-hover); }
}
@media (min-width: 620px) {
  .fx-account.fx-topup { gap: 18px; }
  .fx-topup .fx-topup__tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fx-topup .fx-topup__tabs button { gap: 8px; font-size: .9375rem; }
  .fx-topup .fx-topup__drop { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-topup *, .fx-topup *::before, .fx-topup *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
