/* Shared cashier (deposit / cash-out) modal styles.
   Extracted from games/sunset-valley/css/wallet.css so the cashier can render
   on any page. Deliberately omits wallet.css's global html/body resets. */

@font-face {
  font-family: "Metropolis";
  src: url("/admin/assets/fonts/metropolis/Metropolis-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --ink: #170b08;
  --wood: #4b1f16;
  --brass: #e3a62f;
  --parchment: #fff1c9;
  --muted: #d4b895;
  --success: #75d69a;
  --failure: #ff9b86;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, a { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background:
    linear-gradient(90deg, rgba(20, 7, 4, .78), rgba(20, 7, 4, .42), rgba(20, 7, 4, .82)),
    url("/frontend/assets/sunset-valley-saloon-backdrop.png") center / cover;
}
.overlay.is-open { display: grid; }

.deposit-card {
  position: relative;
  width: min(420px, 100%);
  padding: clamp(26px, 5vw, 42px);
  border: 2px solid rgba(227, 166, 47, .76);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(90, 27, 21, .98), rgba(38, 12, 10, .98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .68), inset 0 0 0 5px rgba(18, 5, 4, .62);
}
#deposit-modal, #cashout-modal {
  background: rgba(15, 6, 4, .8);
  backdrop-filter: blur(6px) sepia(.18);
}
#deposit-modal .deposit-card, #cashout-modal .deposit-card {
  max-height: min(92vh, 780px);
  padding: 22px 24px 18px;
  overflow-y: auto;
  color: var(--parchment);
  border: 1px solid #e8b94f;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,225,154,.07), transparent 70px),
    linear-gradient(145deg, #3a1711, #1c0c09 68%, #120705);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .72), inset 0 0 0 3px rgba(10, 3, 2, .55), inset 0 1px rgba(255,235,183,.2);
  scrollbar-color: #9d641e #1a0b08;
  scrollbar-width: thin;
}
.cashout-warning-modal { z-index: 1010; background: rgba(15, 6, 4, .9); backdrop-filter: blur(8px) sepia(.25); }
.cashout-warning-card { width: min(370px, 100%); text-align: center; }
.cashout-warning-mark { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 12px; color: #351109; border: 1px solid #ffbeab; border-radius: 50%; background: linear-gradient(#ffc3ac, #e46d50); font: 900 23px/1 Georgia, serif; box-shadow: 0 0 0 5px rgba(255,155,134,.12); }
.cashout-warning-card h2 { margin: 0; color: #ffe0d4; font: 700 22px/1.1 Georgia, serif; }
.cashout-warning-card p { margin: 11px 0 18px; color: #d9b3a4; font-size: 11px; line-height: 1.55; }

h1, h2 { font-family: Georgia, serif; letter-spacing: -.04em; }

.state-message { min-height: 22px; margin-top: 16px; color: var(--brass); font-size: 13px; line-height: 1.5; }
.state-message[data-kind="success"] { color: var(--success); }
.state-message[data-kind="failed"] { color: var(--failure); }

.deposit-heading { display: grid; grid-template-columns: 34px 1fr 34px; align-items: start; margin-bottom: 22px; text-align: center; }
.deposit-kicker { display: block; margin-bottom: 4px; color: var(--brass); font-size: 8px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.deposit-heading h2 { margin: 0; color: var(--parchment); font: 700 23px/1.1 Georgia, serif; letter-spacing: -.025em; }
.deposit-heading p { margin: 5px 0 0; color: #b79b7d; font-size: 10px; }
.deposit-heading p strong { color: var(--success); font-weight: 800; }
.deposit-back, .close-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: #bda487; border: 1px solid transparent; border-radius: 50%; background: transparent; font-size: 25px; line-height: 1; cursor: pointer; }
.close-button { justify-self: end; font-size: 21px; }
.deposit-back:hover, .close-button:hover { color: var(--parchment); border-color: rgba(227,166,47,.35); background: rgba(227,166,47,.1); }

.deposit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.deposit-field-label { display: block; margin: 0 0 7px 1px; color: #d9c1a4; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.deposit-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 42px;
  color: var(--parchment);
  border: 1px solid rgba(227,166,47,.28);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(35,16,12,.96), rgba(13,5,4,.9));
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 1px 0 rgba(0,0,0,.35);
  font: 700 12px/1 Metropolis, Arial, sans-serif;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.deposit-select:hover { border-color: rgba(238,181,64,.58); background: linear-gradient(180deg, rgba(42,19,14,.98), rgba(17,7,5,.94)); }
.deposit-select:focus-within { border-color: #e3a62f; box-shadow: 0 0 0 3px rgba(227,166,47,.14), inset 0 1px rgba(255,255,255,.04); }
.deposit-select.is-open { z-index: 40; border-color: #e3a62f; border-radius: 7px 7px 5px 5px; box-shadow: 0 0 0 3px rgba(227,166,47,.14), 0 10px 30px rgba(0,0,0,.42); }
.select-icon { display: block; flex: 0 0 24px; width: 24px; height: 24px; margin-left: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: #0a0a0b; box-shadow: 0 2px 6px rgba(0,0,0,.38); object-fit: cover; }
.custom-select-trigger { display: flex; align-items: center; min-width: 0; flex: 1; width: 100%; height: 100%; padding: 0 34px 0 0; overflow: hidden; color: inherit; border: 0; outline: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.custom-select-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-chevron { position: absolute; top: 50%; right: 13px; width: 7px; height: 7px; pointer-events: none; border-right: 2px solid #c99b54; border-bottom: 2px solid #c99b54; transform: translateY(-68%) rotate(45deg); transition: border-color .16s ease, transform .16s ease; }
.deposit-select:hover .select-chevron, .deposit-select:focus-within .select-chevron { border-color: #f0c15d; }
.deposit-select.is-open .select-chevron { transform: translateY(-25%) rotate(225deg); }
.custom-select-menu { position: absolute; top: calc(100% + 6px); right: -1px; left: -1px; z-index: 50; max-height: 190px; padding: 5px; overflow-y: auto; border: 1px solid rgba(227,166,47,.55); border-radius: 7px; background: linear-gradient(180deg, #2b130e, #180907); box-shadow: 0 14px 32px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.04); }
.custom-select-menu[hidden] { display: none; }
.custom-select-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 7px 9px; color: #d9c4aa; border: 1px solid transparent; border-radius: 5px; outline: 0; background: transparent; font: 700 11px/1.2 Metropolis, Arial, sans-serif; text-align: left; cursor: pointer; }
.custom-select-option:hover, .custom-select-option:focus-visible { color: #fff3d9; border-color: rgba(227,166,47,.28); background: rgba(227,166,47,.12); }
.custom-select-option[aria-selected="true"] { color: #f3c766; background: rgba(227,166,47,.09); }
.custom-select-option-symbol { display: block; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: #0a0a0b; box-shadow: 0 1px 4px rgba(0,0,0,.3); object-fit: cover; }
.custom-select-option-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-option-availability { display: none; flex: 0 0 auto; padding: 3px 6px; border: 1px solid rgba(117,214,154,.3); border-radius: 999px; color: #75d69a; font-size: 7px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.custom-select-option[data-availability="ready"] .custom-select-option-availability,
.custom-select-option[data-availability="paused"] .custom-select-option-availability { display: inline-flex; }
.custom-select-option[data-availability="paused"] .custom-select-option-availability { color: #efb06f; border-color: rgba(239,176,111,.34); background: rgba(239,176,111,.07); }
.custom-select-option-check { width: 12px; color: #efbd50; font-size: 12px; opacity: 0; }
.custom-select-option[aria-selected="true"] .custom-select-option-check { opacity: 1; }
.deposit-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 260px; color: #b99d7e; font-size: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(227,166,47,.25); border-top-color: var(--brass); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cashier-ticket { display: grid; justify-items: center; color: var(--parchment); }
.deposit-unavailable { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; margin: 2px 0 14px; padding: 14px; border: 1px solid rgba(239, 176, 111, .36); border-radius: 8px; background: linear-gradient(115deg, rgba(239,176,111,.11), rgba(70,25,17,.18)); }
.deposit-unavailable[hidden] { display: none; }
.deposit-unavailable-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #2b100b; border-radius: 50%; background: #e8a94d; box-shadow: 0 0 0 4px rgba(232,169,77,.1); font: 900 18px/1 Georgia, serif; }
.deposit-unavailable strong, .deposit-unavailable p, .deposit-unavailable small { display: block; }
.deposit-unavailable strong { color: #f4d8ad; font-size: 11px; }
.deposit-unavailable p { margin: 4px 0; color: #c5a685; font-size: 9px; line-height: 1.45; }
.deposit-unavailable small { color: #dfad61; font-size: 8px; line-height: 1.45; }
.network-caption { margin-bottom: 10px; color: var(--brass); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.deposit-qr-frame { display: grid; place-items: center; width: 158px; height: 158px; margin: 0 auto 21px; border: 3px solid #d6a440; border-radius: 8px; background: #fff8e7; box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 3px rgba(82,37,15,.9); }
.deposit-qr { width: 140px; height: 140px; border-radius: 5px; }
.address-heading { display: flex; justify-content: space-between; width: 100%; margin-bottom: 7px; color: #ead7bd; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.address-heading span:last-child { color: #9d8063; }
.deposit-address-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
.deposit-address-wrap { display: flex; align-items: center; min-width: 0; min-height: 40px; padding: 7px 10px; overflow: hidden; border: 1px solid rgba(227,166,47,.25); border-radius: 7px 0 0 7px; background: rgba(10, 4, 3, .72); }
.deposit-address { width: 100%; overflow: hidden; color: #e9d9c5; font: 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.address-copy { min-height: 40px; padding: 8px 12px; color: #271008; border: 1px solid #f0c35e; border-radius: 0 7px 7px 0; background: linear-gradient(#f4c85f, #d69522); box-shadow: inset 0 1px rgba(255,255,255,.4); font-size: 10px; font-weight: 900; cursor: pointer; }
.address-copy:hover { filter: brightness(1.08); }
.address-copy span { margin-right: 3px; color: #5c2c10; }
.brass-button, .copy-button { padding: 10px 15px; color: var(--ink); border: 1px solid #ffd86d; border-radius: 5px; background: linear-gradient(#ffd86d, var(--brass)); font-weight: 900; cursor: pointer; }
.copy-button { width: 100%; min-height: 37px; padding: 8px 12px; color: #271008; border: 1px solid #f0c35e; border-radius: 0 0 7px 7px; background: linear-gradient(#f4c85f, #d69522); box-shadow: inset 0 1px rgba(255,255,255,.4); font-size: 11px; font-weight: 900; }
.copy-button:hover { filter: brightness(1.08); }
.copy-button span { margin-right: 4px; color: #5c2c10; }
.explorer-link { margin-top: 9px; color: #c7a674; font-size: 9px; text-decoration: none; }
.explorer-link:hover { color: var(--parchment); }
.deposit-rate { min-height: 15px; margin: 11px 0 8px; color: #a78d70; font-size: 9px; text-align: center; }
.deposit-promotions { display: grid; gap: 4px; margin: 9px 0; padding: 10px 11px; border: 1px solid rgba(117,214,154,.28); border-radius: 7px; background: linear-gradient(100deg, rgba(117,214,154,.10), rgba(227,166,47,.08)); }
.deposit-promotions strong { color: #9de1b7; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.deposit-promotions span { color: #e8d4b3; font-size: 10px; line-height: 1.4; }

.transaction-state { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid rgba(227,166,47,.22); border-radius: 7px; background: rgba(11, 4, 3, .55); }
.transaction-state strong { color: #ead9c3; font-size: 10px; }
.transaction-state p { margin: 3px 0 0; color: #aa8d70; font-size: 9px; line-height: 1.4; }
.state-icon { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; border: 2px solid var(--brass); border-radius: 50%; }
.transaction-state[data-state="watching"] .state-icon,
.transaction-state[data-state="pending"] .state-icon { border-top-color: transparent; animation: spin .8s linear infinite; }
.transaction-state[data-state="success"] { border-color: rgba(117,214,154,.45); }
.transaction-state[data-state="success"] .state-icon { border-color: var(--success); background: var(--success); box-shadow: inset 0 0 0 4px var(--ink); }
.transaction-state[data-state="failed"] { border-color: rgba(255,155,134,.5); }
.transaction-state[data-state="failed"] .state-icon { border-color: var(--failure); background: linear-gradient(45deg, transparent 44%, var(--failure) 45%, var(--failure) 55%, transparent 56%); }
.deposit-warning { margin-top: 9px; color: #997d61; font-size: 8px; line-height: 1.45; text-align: center; }
.deposit-limits { display: grid; gap: 4px; width: 100%; margin: 10px 0; padding: 11px 12px; color: #d9bb7b; border: 1px solid rgba(227,166,47,.38); border-radius: 7px; background: linear-gradient(105deg, rgba(227,166,47,.14), rgba(107,43,20,.18)); }
.deposit-limits__label { color: #f3d18a; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.deposit-limits strong { color: #ffe0a0; font: 800 15px/1 Georgia, serif; white-space: nowrap; }
.deposit-limits small { grid-column: 1 / -1; color: #bda382; font-size: 9px; line-height: 1.35; }
.history-heading { margin-top: 12px; color: var(--brass); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.deposit-history { max-height: 180px; margin-top: 4px; overflow-y: auto; }
.history-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 9px 2px; border-top: 1px solid rgba(227,166,47,.18); font-size: 11px; }
.history-row small { color: var(--muted); }
.history-row a { color: var(--brass); }
.history-row .deposit-rejection { grid-column: 1 / -1; color: var(--failure); }
.history-empty { margin: 0; padding: 12px 2px; border-top: 1px solid rgba(227,166,47,.18); color: var(--muted); font-size: 10px; }
.deposit-footer { display: flex; justify-content: center; gap: 9px; margin-top: 11px; color: #81694f; font-size: 9px; }
.deposit-footer span + span::before { margin-right: 9px; content: "·"; }

.cashout-card { width: min(480px, 100%) !important; }
.cashout-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.cashout-balances span { display: grid; gap: 3px; color: #a98e77; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cashout-balances strong { color: #f2ddb8; font: 700 13px/1.15 Georgia, serif; letter-spacing: 0; text-transform: none; }
.cashout-balances span:last-child strong { color: #9de1b7; }
.cashout-form { display: grid; }
.cashout-input { width: 100%; min-height: 43px; margin-bottom: 15px; padding: 9px 11px; color: #f8e8cf; border: 1px solid rgba(227,166,47,.3); border-radius: 7px; outline: 0; background: rgba(10,4,3,.7); font: 700 12px/1.2 Metropolis, Arial, sans-serif; }
.cashout-input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.cashout-input[type="number"]::-webkit-inner-spin-button,
.cashout-input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.cashout-input:focus { border-color: #e3a62f; box-shadow: 0 0 0 3px rgba(227,166,47,.14); }
.cashout-address-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.cashout-preview { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 0 0 17px; padding: 13px; border: 1px solid rgba(117,214,154,.25); border-radius: 8px; background: linear-gradient(115deg, rgba(117,214,154,.08), rgba(227,166,47,.06)); }
.cashout-preview div { display: grid; gap: 5px; }
.cashout-preview div:last-child { text-align: right; }
.cashout-preview span { color: #a98e77; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cashout-preview strong { color: #f2ddb8; font: 700 15px/1 Georgia, serif; }
.cashout-preview div:last-child strong { color: var(--success); }
.cashout-arrow { color: var(--brass) !important; font-size: 16px !important; }
.cashout-chains { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 15px; }
.cashout-chains button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 10px; color: #c8ae91; border: 1px solid rgba(227,166,47,.23); border-radius: 7px; background: rgba(10,4,3,.58); font-size: 10px; font-weight: 800; cursor: pointer; }
.cashout-chains button:hover { color: #f7e8ce; border-color: rgba(227,166,47,.55); }
.cashout-chains button[aria-pressed="true"] { color: #f5cc71; border-color: #d99d2d; background: rgba(227,166,47,.12); box-shadow: 0 0 0 2px rgba(227,166,47,.08); }
.cashout-chains img { width: 22px; height: 22px; border-radius: 50%; }
.cashout-terms { margin: 0 0 14px; padding: 11px 12px; color: #a98e77; border-left: 2px solid rgba(227,166,47,.55); background: rgba(227,166,47,.05); font-size: 9px; line-height: 1.55; }
.cashout-terms strong { display: block; margin-bottom: 5px; color: #f3ce84; font-size: 11px; }
.cashout-submit { border-radius: 7px; }
.cashout-state { min-height: 18px; margin: 11px 0 3px; font-size: 10px; }
.cashout-history { max-height: 190px; overflow-y: auto; }
.cashout-history-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; padding: 10px 2px; border-top: 1px solid rgba(227,166,47,.18); }
.cashout-history-row strong { color: #ead8bd; font-size: 10px; }
.cashout-history-row > span { color: #d8a84d; font-size: 9px; font-weight: 800; text-transform: capitalize; }
.cashout-history-row small { grid-column: 1 / -1; color: #947b63; font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.cashout-history-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cashout-history-actions a { color: #dcb05a; font-size: 9px; }
.cashout-cancel { padding: 5px 8px; color: #f2baaa; border: 1px solid rgba(255,155,134,.35); border-radius: 5px; background: rgba(255,155,134,.08); font-size: 8px; font-weight: 800; cursor: pointer; }
.cashout-cancel:disabled { opacity: .55; cursor: wait; }

.queued-packages { display: grid; gap: 6px; margin: 10px 0; }
.queued-package { padding: 8px; color: #e5cfad; border: 1px solid rgba(227,166,47,.18); border-radius: 6px; background: rgba(11,4,3,.35); font-size: 10px; line-height: 1.4; }

@media (max-width: 680px) {
  #deposit-modal, #cashout-modal { padding: 10px; }
  #deposit-modal .deposit-card, #cashout-modal .deposit-card { margin: auto 0; padding: 16px; border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
