/* =========================================================================
   atm.css — HORIZON BANK ბანკომატი (CEF.ATM = 32 / page-atm)
   ფერები: #ff4747 (წითელი) · #eaeaea (ღია) · #0a0a0a (მუქი შავი)
   ყველა სელექტორი დასკოპულია #page-atm-ზე, კლასები იწყება at- პრეფიქსით.
   ========================================================================= */
#page-atm {
  --red: #ff4747; --red-d: #d93232; --light: #eaeaea; --black: #0a0a0a; --ink: #151515; --muted: #0a0a0a8c; --line: #0a0a0a1a;
  --ok: #1fa84f; --err: #e5322d;
  font-family: "Noto Sans Georgian", "Manrope", "Segoe UI", Arial, sans-serif;
  color: var(--ink); overflow: hidden; user-select: none;
}
#page-atm * { box-sizing: border-box; margin: 0; padding: 0; }
#page-atm button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
#page-atm button:disabled { cursor: not-allowed; }
#page-atm .at-bg { position: absolute; inset: 0; background:
  radial-gradient(55% 45% at 50% 100%, #ff474733, transparent 70%),
  radial-gradient(50% 50% at 15% 0%, #eaeaea1a, transparent 70%),
  linear-gradient(180deg, #0e0b0b 0%, #050505 100%); }
#page-atm .at-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, #000000b0 100%); }

/* ---------- კორპუსი ---------- */
#page-atm .at-kiosk { position: relative; z-index: 2; width: min(900px, 94vw, calc((100vh - 120px) * 1.32)); display: flex; flex-direction: column;
  filter: drop-shadow(0 28px 50px #000000b8); }
#page-atm .at-sign { display: flex; align-items: center; justify-content: space-between; padding: 9px 22px; background: var(--black); color: var(--light);
  border-radius: 18px 18px 0 0; border: 1px solid #ffffff14; border-bottom: 0; font: 700 clamp(14px, 2.2vh, 20px) "Rajdhani", "Noto Sans Georgian", sans-serif; letter-spacing: .24em; }
#page-atm .at-sign b { color: var(--red); }
#page-atm .at-led { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: atBlink 2.2s infinite; }
@keyframes atBlink { 50% { opacity: .35; } }
#page-atm .at-bezel { padding: clamp(10px, 1.8vh, 18px); background: linear-gradient(160deg, #ff5d5d, #ff4747 45%, #d93232); box-shadow: inset 0 0 0 2px #ffffff30, inset 0 -6px 14px #00000040; }
#page-atm .at-screen { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--light); border-radius: 8px;
  border: clamp(5px, .9vh, 9px) solid var(--black); aspect-ratio: 4 / 3; max-height: calc(100vh - 230px); width: 100%; }
#page-atm .at-base { display: flex; align-items: center; justify-content: space-around; gap: 20px; padding: 12px 26px 14px; border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #f2f2f2, var(--light) 55%, #c9c9c9); border: 1px solid #ffffff40; }
#page-atm .at-slot { display: flex; flex-direction: column; align-items: center; gap: 5px; }
#page-atm .at-slot small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #0a0a0a99; font-weight: 700; }
#page-atm .at-slot i { display: block; background: var(--black); border-radius: 3px; box-shadow: inset 0 3px 6px #000, 0 1px 0 #fff; }
#page-atm .at-slot-card i { width: 90px; height: 9px; }
#page-atm .at-slot-cash i { width: 190px; height: 13px; }

/* ---------- ეკრანის ზედა ზოლი ---------- */
#page-atm .at-sbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; background: var(--black); color: var(--light); flex: none; }
#page-atm .at-sbrand { display: flex; align-items: center; gap: 11px; min-width: 0; }
#page-atm .at-logo { width: 34px; height: 34px; flex: none; }
#page-atm .at-stitle { font: 700 clamp(14px, 2.3vh, 19px) "Noto Sans Georgian", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#page-atm .at-ssub { font-size: 10.5px; color: #eaeaea8c; letter-spacing: .06em; }
#page-atm .at-sright { display: flex; align-items: center; gap: 12px; }
#page-atm .at-clock { font: 600 16px "Rajdhani", sans-serif; letter-spacing: .08em; color: var(--red); }
#page-atm .at-nav { display: flex; align-items: center; gap: 5px; padding: 6px 12px 6px 8px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; transition: .15s; }
#page-atm .at-nav svg { width: 17px; height: 17px; }
#page-atm .at-nav:hover { background: #ff6a6a; }

#page-atm .at-main { flex: 1; min-height: 0; padding: clamp(10px, 2vh, 18px); display: flex; }

/* ---------- მთავარი ---------- */
#page-atm .at-home { flex: 1; display: grid; grid-template-columns: minmax(170px, 27%) 1fr; gap: clamp(10px, 2vh, 18px); min-height: 0; }
#page-atm .at-acc { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
#page-atm .at-hello { padding: 4px 2px 2px; }
#page-atm .at-hello small { display: block; font-size: 11px; color: var(--muted); }
#page-atm .at-hello b { font: 800 clamp(15px, 2.4vh, 19px) "Noto Sans Georgian", sans-serif; line-height: 1.2; word-break: break-word; }
#page-atm .at-mini { position: relative; padding: 12px 13px; border-radius: 12px; color: var(--light); overflow: hidden; background: linear-gradient(135deg, #2a1212, #0a0a0a 55%, #1f0a0a); box-shadow: 0 6px 16px #00000040; }
#page-atm .at-mini::after { content: ""; position: absolute; right: -25%; bottom: -60%; width: 90%; height: 120%; border-radius: 50%; background: radial-gradient(closest-side, #ff4747b0, transparent 70%); }
#page-atm .at-mini span { font: 700 11px "Rajdhani", sans-serif; letter-spacing: .2em; }
#page-atm .at-mini span b { color: var(--red); }
#page-atm .at-mnum { margin-top: 14px; font: 600 clamp(11px, 1.7vh, 14px) "Rajdhani", monospace; letter-spacing: .12em; position: relative; z-index: 1; }
#page-atm .at-mini.off { filter: grayscale(1); opacity: .55; }
#page-atm .at-bal { padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
#page-atm .at-bal small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
#page-atm .at-bal b { font: 700 clamp(17px, 2.8vh, 23px) "Rajdhani", sans-serif; letter-spacing: .02em; }
#page-atm .at-bal.cash b { color: var(--red-d); }
#page-atm .at-note { font-size: 11px; line-height: 1.4; color: var(--red-d); background: #ff474714; border: 1px dashed #ff474766; border-radius: 8px; padding: 7px 9px; }

#page-atm .at-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: clamp(8px, 1.6vh, 14px); min-height: 0; }
#page-atm .at-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 10px 8px; border-radius: 10px;
  background: linear-gradient(160deg, #ff5757, #ff4747 55%, #ee3a3a); color: #fff; box-shadow: 0 5px 0 #b82828, 0 9px 18px #ff474740; transition: transform .1s, box-shadow .1s, filter .15s; }
#page-atm .at-tile:hover:not(:disabled) { filter: brightness(1.07); }
#page-atm .at-tile:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #b82828, 0 3px 8px #ff474740; }
#page-atm .at-ti { width: clamp(34px, 7vh, 58px); height: clamp(34px, 7vh, 58px); display: block; }
#page-atm .at-ti svg { width: 100%; height: 100%; }
#page-atm .at-tile b { font: 800 clamp(12px, 1.95vh, 15.5px) "Noto Sans Georgian", sans-serif; line-height: 1.2; }
#page-atm .at-tile small { font-size: clamp(9.5px, 1.4vh, 11.5px); opacity: .85; }
#page-atm .at-tile.soon { background: linear-gradient(160deg, #1d1d1d, #0a0a0a); color: #eaeaea8c; box-shadow: 0 5px 0 #000, 0 9px 18px #00000030; }
#page-atm .at-tile.soon small { color: var(--red); opacity: 1; font-weight: 700; letter-spacing: .08em; }

/* ---------- თანხა / ნომერი ---------- */
#page-atm .at-op { flex: 1; display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(10px, 2vh, 18px); min-height: 0; }
#page-atm .at-opl { display: flex; flex-direction: column; gap: 9px; min-height: 0; }
#page-atm .at-opr { display: flex; min-height: 0; }
#page-atm .at-field { background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 7px 13px 8px; cursor: pointer; transition: .15s; }
#page-atm .at-field small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
#page-atm .at-field b { display: block; font: 700 clamp(19px, 3.1vh, 27px) "Rajdhani", sans-serif; letter-spacing: .06em; min-height: 1.2em; }
#page-atm .at-field b em { font-style: normal; color: #0a0a0a40; font-weight: 600; }
#page-atm .at-field.big b { font-size: clamp(26px, 4.6vh, 40px); }
#page-atm .at-field.on { border-color: var(--red); box-shadow: 0 0 0 3px #ff474730; }
#page-atm .at-field.on b::after { content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 3px; background: var(--red); vertical-align: -.1em; animation: atBlink 1s steps(1) infinite; }
#page-atm .at-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
#page-atm .at-chip { padding: 8px 4px; border-radius: 8px; background: var(--black); color: var(--light); font: 700 clamp(12px, 1.9vh, 15px) "Rajdhani", sans-serif; letter-spacing: .04em; transition: .12s; }
#page-atm .at-chip:hover { background: #262626; }
#page-atm .at-chip.on { background: var(--red); color: #fff; }
#page-atm .at-pay { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#page-atm .at-pay small { font-size: 11px; color: var(--muted); font-weight: 600; }
#page-atm .at-pay div { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 2px solid var(--black); }
#page-atm .at-pay button { padding: 6px 12px; font-size: 12px; font-weight: 700; background: #fff; }
#page-atm .at-pay button.on { background: var(--black); color: var(--light); }
#page-atm .at-avail { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; border-radius: 8px; background: #0a0a0a0d; font-size: 12px; color: var(--muted); }
#page-atm .at-avail b { font: 700 16px "Rajdhani", sans-serif; color: var(--ink); }
#page-atm .at-go { margin-top: auto; padding: 12px 14px; border-radius: 10px; background: var(--red); color: #fff; font: 800 clamp(13px, 2.1vh, 16px) "Noto Sans Georgian", sans-serif;
  box-shadow: 0 4px 0 #b82828; transition: .1s; }
#page-atm .at-go:hover:not(:disabled) { filter: brightness(1.08); }
#page-atm .at-go:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #b82828; }
#page-atm .at-go:disabled { background: #0a0a0a26; color: #0a0a0a66; box-shadow: none; }
#page-atm .at-go.ghost { background: var(--black); box-shadow: 0 4px 0 #000; }

#page-atm .at-keys { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 7px; }
#page-atm .at-key { border-radius: 10px; background: var(--black); color: var(--light); font: 700 clamp(18px, 3.2vh, 28px) "Rajdhani", sans-serif;
  box-shadow: 0 3px 0 #000; transition: .08s; display: flex; align-items: center; justify-content: center; }
#page-atm .at-key svg { width: 26px; height: 26px; }
#page-atm .at-key:hover { background: #262626; }
#page-atm .at-key:active { transform: translateY(3px); box-shadow: none; background: var(--red); }
#page-atm .at-key.alt { background: #2b2b2b; color: var(--red); }

/* ---------- ჩეკი ---------- */
#page-atm .at-rcpt { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
#page-atm .at-rok { width: clamp(46px, 9vh, 70px); color: var(--ok); animation: atPop .45s cubic-bezier(.2, 1.6, .4, 1); }
#page-atm .at-rok svg { width: 100%; height: 100%; }
@keyframes atPop { from { transform: scale(.3); opacity: 0; } }
#page-atm .at-rcpt h2 { font: 800 clamp(17px, 3vh, 24px) "Noto Sans Georgian", sans-serif; }
#page-atm .at-rows { width: min(420px, 100%); background: #fff; border-radius: 10px; border: 1px solid var(--line); padding: 4px 14px;
  background-image: repeating-linear-gradient(90deg, transparent 0 8px, #0a0a0a14 8px 10px); background-size: 100% 2px; background-repeat: no-repeat; background-position: top; }
#page-atm .at-rows div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px dashed #0a0a0a1f; font-size: 13px; }
#page-atm .at-rows div:last-child { border-bottom: 0; }
#page-atm .at-rows span { color: var(--muted); }
#page-atm .at-rows b { font-weight: 700; text-align: right; }
#page-atm .at-ract { display: flex; gap: 10px; width: min(420px, 100%); margin-top: 4px; }
#page-atm .at-ract .at-go { flex: 1; margin-top: 0; }

/* ---------- დამუშავება / შეტყობინება ---------- */
#page-atm .at-busy { position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #eaeaeae8; font-weight: 700; }
#page-atm .at-busy.on { display: flex; }
#page-atm .at-spin { width: 46px; height: 46px; border-radius: 50%; border: 5px solid #0a0a0a1f; border-top-color: var(--red); animation: atSpin .8s linear infinite; }
@keyframes atSpin { to { transform: rotate(360deg); } }
#page-atm .at-toast { position: absolute; z-index: 7; left: 50%; bottom: 14px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 10px;
  background: var(--black); color: var(--light); border: 2px solid transparent; font-size: 13px; font-weight: 700; transition: .2s; white-space: nowrap; max-width: 94%; overflow: hidden; text-overflow: ellipsis; }
#page-atm .at-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#page-atm .at-toast.ok { border-color: var(--ok); }
#page-atm .at-toast.err { border-color: var(--red); }

#page-atm .at-close { position: absolute; z-index: 3; top: 18px; right: 22px; padding: 8px 14px; border-radius: 8px; border: 1px solid #eaeaea33; color: var(--light); font-size: 13px; transition: .15s; }
#page-atm .at-close:hover { border-color: var(--red); color: var(--red); }

@media (max-height: 620px) { #page-atm .at-base { display: none; } #page-atm .at-screen { max-height: calc(100vh - 110px); } }
