*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,system-ui,Segoe UI,Roboto,sans-serif;background:#0f1424;color:#e8ebf5;display:flex;justify-content:center;padding:24px}
.card{background:#1a2036;border-radius:16px;padding:24px;width:100%;max-width:440px}
.card.wide{max-width:820px}
h1{margin-top:0;font-size:22px}
.amount{font-size:34px;font-weight:700;margin:12px 0 18px}
dl{display:grid;grid-template-columns:110px 1fr;gap:8px 12px;font-size:14px}
dt{color:#8b93b0}dd{margin:0;word-break:break-all}
.mono{font-family:ui-monospace,Menlo,monospace;font-size:12px;word-break:break-all}
.hint{color:#8b93b0;font-size:13px}
input{width:100%;padding:12px;margin:6px 0;border-radius:10px;border:1px solid #2c3556;background:#0f1424;color:#fff}
button{width:100%;padding:14px;margin-top:12px;border:0;border-radius:12px;background:#3375bb;color:#fff;font-size:16px;font-weight:600;cursor:pointer}
button:disabled{opacity:.5}
button.secondary{background:#2c3556;width:auto;padding:8px 14px;margin:0}
button.small{width:auto;padding:6px 12px;margin:0;font-size:13px}
.row{display:flex;justify-content:space-between;align-items:center}
.msg{min-height:20px;font-size:14px}.msg.err{color:#ff7b7b}.msg.ok{color:#5ee08a}
#qrBox{text-align:center;background:#fff;color:#000;border-radius:12px;padding:16px;margin:16px 0}
#qrBox img{max-width:280px;width:100%}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{text-align:left;padding:8px 6px;border-bottom:1px solid #2c3556}
a{color:#7fb0ff}
.st-confirmed{color:#5ee08a}.st-failed,.st-expired{color:#ff7b7b}.st-submitted{color:#ffd166}

/* ===== OVERLAY EFEKTI ===== */
.overlay-mask {
  display: none;
}

body.overlay-active .overlay-mask {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 998;
  pointer-events: none;
}

/* CARD ostaje vidljiv iznad maske */
body.overlay-active .card {
  position: relative;
  z-index: 1001;
}

/* Payment labela */
.amount-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  margin-top: 0;
}

body.overlay-active .amount-label {
  display: block !important;
}

/* SAKRIJ ove elemente */
body.overlay-active h1 {
  display: none;
}

body.overlay-active .amount {
  display: none;
}

body.overlay-active dl {
  display: none;
}

/* OSTAVI VIDLJIVO */
.amount-overlay {
  display: flex;
  align-items: center;
  border: 2px solid #4d9fff;
  border-radius: 12px;
  position: relative;
  z-index: 1001;
  background: #353741 !important;
  padding: 15px 18px;
}

.amount-overlay input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.75rem;
  font-weight: 500;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  -moz-appearance: textfield;
  padding: 0;
  margin: 0;
  cursor: text;
}

.amount-overlay input:focus {
  outline: none;
}

.amount-overlay input::placeholder {
  color: #5c6080;
}

.amount-overlay input::-webkit-outer-spin-button,
.amount-overlay input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-overlay .token-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #9da3c8;
  padding-left: 12px;
  white-space: nowrap;
  margin: 0;
}

body.overlay-active .hint {
  display: block !important;
}

body.overlay-active #payBtn {
  display: block !important;
}
/* ===== BIJELA POZADINA — SAMO PAY STRANICA ===== */
body.overlay-active { background: #ffffff !important; color: #1a2036 !important; }
body.overlay-active .card { background: #ffffff !important; }
body.overlay-active .amount-label { color: #1a2036 !important; }
body.overlay-active .hint { color: #5c6080 !important; }
body.overlay-active .overlay-mask {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: none !important;
}
body.overlay-active .overlay-spotlight {
  box-shadow: inset 0 0 0 9999px rgba(255,255,255,0.92) !important;
}
/* Amount box bijel */
body.overlay-active .amount-overlay {
  background: #ffffff !important;
  border: 2px solid #4d9fff !important;
}
body.overlay-active .amount-overlay input { color: #1a2036 !important; }
body.overlay-active .amount-overlay input::placeholder { color: #9aa0b8 !important; }
body.overlay-active .amount-overlay .token-label { color: #1a2036 !important; }

/* Skracena Pay to adresa na pay stranici */
.pay-to-short { display:block; text-align:center; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:14px; color:#1a2036; margin:10px 0 0; }
body.overlay-active .pay-to-short { display:block !important; }
