/* =====================================================================
   ONEMC.LT – balanso papildymas (langas + puslapis)
   Suderinta su svetainės tamsia mėlyna sistema. Visos paspaudžiamos zonos ≥ 44 px.
   ===================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Langas ---------- */

body.tp-open { overflow: hidden; }

.tp-modal[hidden] { display: none; }

.tp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 9, .78);
    backdrop-filter: blur(3px);
}

.tp-sheet {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #11151e;
    border: 1px solid rgba(59, 130, 246, .3);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
    animation: tp-in .18s ease-out;
}

@keyframes tp-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

.tp-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(31, 41, 55, .9);
    background:
        linear-gradient(rgba(10, 13, 20, .88), rgba(10, 13, 20, .96)),
        url('/assets/minecraft-bg.jpg') center / cover no-repeat;
}

.tp-head h2 { margin: 0; color: #fff; font-size: 17px; font-weight: 800; }
.tp-head p  { margin: 3px 0 0; color: #9ca3af; font-size: 12px; }

.tp-head-icon {
    flex: none;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .3);
    color: #60a5fa;
    font-size: 16px;
}

.tp-close {
    flex: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(55, 65, 81, .8);
    border-radius: 12px;
    color: #9ca3af;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.tp-close:hover { background: #1f2937; color: #fff; }

.tp-body { padding: 20px 22px 22px; overflow-y: auto; }

/* ---------- Forma ---------- */

.topup { color: #e5e7eb; }

.tp-balance {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #0a0d14;
    border: 1px solid rgba(31, 41, 55, .9);
    border-radius: 12px;
    font-size: 12px;
    color: #9ca3af;
}

.tp-balance strong { color: #fff; font-size: 17px; font-weight: 800; }

.tp-section { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }

.tp-label {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    color: #d1d5db;
    font-size: 13px;
    font-weight: 700;
}

.tp-amount { position: relative; }

.tp-amount input {
    width: 100%;
    box-sizing: border-box;
    height: 64px;
    padding: 0 52px 0 18px;
    background: #0a0d14;
    border: 1px solid #1f2937;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.01em;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.tp-amount input:hover { border-color: #374151; }

.tp-amount input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

.tp-amount input[aria-invalid="true"] { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }

.tp-currency {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 24px;
    font-weight: 700;
    pointer-events: none;
}

.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.tp-chip {
    min-width: 56px;
    height: 44px;
    padding: 0 16px;
    background: #0a0d14;
    border: 1px solid #1f2937;
    border-radius: 10px;
    color: #9ca3af;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}

.tp-chip:hover { color: #fff; border-color: #374151; }

.tp-chip[aria-pressed="true"] {
    background: rgba(59, 130, 246, .14);
    border-color: rgba(59, 130, 246, .6);
    color: #93c5fd;
}

.tp-hint  { margin: 10px 0 0; color: #6b7280; font-size: 11px; }
.tp-error { margin: 10px 0 0; color: #f87171; font-size: 12px; font-weight: 600; }
.tp-error[hidden] { display: none; }

/* ---------- Metodai ---------- */

.tp-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tp-wallets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.tp-wallet {
    position: relative;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .15s, transform .1s, box-shadow .15s;
}

.tp-wallet:active { transform: scale(.985); }

.tp-wallet-mark i { font-size: 44px; line-height: 1; }
.tp-wallet-name   { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.tp-wallet-hint   { font-size: 10px; font-weight: 700; letter-spacing: .02em; }

/* Apple Pay – juodas, Google Pay – baltas (pagal prekių ženklų gaires) */
.tp-wallet--apple_pay  { background: #000; border-color: #3a3a3c; color: #fff; }
.tp-wallet--apple_pay .tp-wallet-hint { color: #a1a1aa; }
.tp-wallet--google_pay { background: #fff; border-color: #dadce0; color: #3c4043; }
.tp-wallet--google_pay .tp-wallet-hint { color: #5f6368; }

.tp-wallet:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }

.tp-wallet:has(.tp-radio:checked) {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .28);
}

.tp-wallet:has(.tp-radio:focus-visible),
.tp-method:has(.tp-radio:focus-visible) {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.tp-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #6b7280;
    font-size: 11px;
}

.tp-or::before, .tp-or::after { content: ''; flex: 1; height: 1px; background: rgba(31, 41, 55, .9); }

.tp-list { display: flex; flex-direction: column; gap: 10px; }

.tp-method {
    position: relative;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #0a0d14;
    border: 1px solid #1f2937;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.tp-method:hover { border-color: #374151; }

.tp-method:has(.tp-radio:checked) {
    background: rgba(59, 130, 246, .07);
    border-color: rgba(59, 130, 246, .6);
}

.tp-method-icon {
    flex: none;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(31, 41, 55, .7);
    color: #93c5fd;
    font-size: 20px;
}

.tp-method-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.tp-method-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #fff; font-size: 14px; font-weight: 700; }

.tp-method-name em {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .25);
    color: #93c5fd;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.tp-method-desc { color: #6b7280; font-size: 11px; }

.tp-check {
    margin-left: auto;
    flex: none;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #374151;
    color: transparent;
    font-size: 10px;
    transition: background .15s, border-color .15s, color .15s;
}

.tp-method:has(.tp-radio:checked) .tp-check { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* ---------- Suvestinė ir mygtukas ---------- */

.tp-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid rgba(31, 41, 55, .9);
    color: #9ca3af;
    font-size: 13px;
}

.tp-summary strong { color: #fff; font-size: 20px; font-weight: 800; }

.tp-pay {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #2563eb;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(59, 130, 246, .28);
    transition: background .15s, transform .1s;
}

.tp-pay:hover { background: #3b82f6; }
.tp-pay:active { transform: translateY(1px); }
.tp-pay:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
.tp-pay:disabled { opacity: .7; cursor: wait; }

.tp-pay.is-loading i { animation: tp-spin 1s linear infinite; }

@keyframes tp-spin { to { transform: rotate(360deg); } }

.tp-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: #6b7280;
    font-size: 11px;
}

.tp-trust i { margin-right: 5px; color: #3b82f6; }

/* ---------- Išjungta būsena ---------- */

.tp-disabled { padding: 34px 16px 20px; text-align: center; }
.tp-disabled i { margin-bottom: 14px; color: #4b5563; font-size: 34px; }
.tp-disabled h3 { margin: 0 0 8px; color: #fff; font-size: 16px; font-weight: 800; }
.tp-disabled p { margin: 0; color: #9ca3af; font-size: 13px; line-height: 1.7; }

/* ---------- Puslapis (/balanso-papildymas.php) ---------- */

.tp-page-card {
    max-width: 520px;
    margin: 0 auto;
    background: #11151e;
    border: 1px solid rgba(31, 41, 55, .9);
    border-radius: 16px;
    padding: 24px;
}

/* ---------- Mobilus: langas kyla iš apačios ---------- */

@media (max-width: 560px) {
    .tp-modal { align-items: flex-end; padding: 0; }
    .tp-sheet { max-width: none; max-height: 94vh; border-radius: 18px 18px 0 0; }
    .tp-body, .tp-head { padding-left: 16px; padding-right: 16px; }
    .tp-amount input { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .tp-sheet, .tp-pay.is-loading i { animation: none; }
    .tp-wallet, .tp-method, .tp-chip, .tp-pay { transition: none; }
}
