/* Vault popup on /play. The markup and behaviour live in
   client_new/scripts/components/VaultModal.js; /vault renders play.html with
   the modal open, exactly like /investment and /support. */

/* Uses the shared popup shell (user-profile-modal.css) for the overlay,
   frame and close button, and the same glass panel as .support-tickets-section
   for the content area. */

.vault-modal {
    width: 95%;
    max-width: 520px;
}

.vault-modal .vault-modal-body {
    padding: 16px;
}

.vault-modal * { box-sizing: border-box; }

.vault-section {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.vault-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-right: 36px; }

.vault-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Same accent bar as .section-title::before. */
.vault-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #00ffcc, #00d4aa);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
    flex-shrink: 0;
}
.vault-subtitle { margin: 2px 0 0; font-size: 12.5px; color: #8b8b93; }

.vault-balance-card {
    background: linear-gradient(145deg, rgba(0, 255, 204, 0.12), rgba(0, 212, 170, 0.04));
    border: 1px solid rgba(0, 255, 204, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    margin-bottom: 18px;
    box-shadow: 0 12px 32px rgb(0 255 204 / 0%), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

/* The card keeps the numbers full width. */
.vault-balance-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vbc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: #8b8b93; }
.vbc-sats { font-size: 22px; font-weight: 800; color: #00ffcc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbc-btc { font-size: 12.5px; color: #9a9aa2; }

.vault-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin-bottom: 18px;
}

.vault-tab {
    flex: 1;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #9a9aa2;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.vault-tab:hover { color: #fff; }
.vault-tab.active {
    border: 1px solid rgba(0, 255, 204, 0.4);
    background: rgba(0, 255, 204, 0.1);
    color: #00ffcc;
}

/* Same active states as the Invest/Divest toggle on /invest. */
.vault-tab.active[data-mode="deposit"] {
    border: 1px solid rgba(0, 255, 204, 0.4);
    color: #ffffff;
    background: rgba(0, 255, 204, 0.1);
    box-shadow: 0 12px 32px rgb(0 255 204 / 0%), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.vault-tab.active[data-mode="withdraw"] {
    background: linear-gradient(183deg, #f443364d, rgb(244 67 54 / 32%));
    border: 1px solid #F44336;
    color: #fff;
    box-shadow: 0 12px 32px rgb(0 255 204 / 0%), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.vault-field { margin-bottom: 14px; }
.vault-label { display: block; font-size: 12.5px; font-weight: 600; color: #b9b9c0; margin-bottom: 7px; }

.vault-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #232325, #1c1c1e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: 0.2s;
}

.vault-input-wrap:focus-within { border-color: #00ffcc; box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.12); }
/* The wrapper already draws the focus ring; drop the global inset shadow
   on the amount input. */
.vault-input-wrap .vault-input:focus { box-shadow: none; }
.vault-input-wrap.vault-invalid { border-color: #ff3b6b; box-shadow: 0 0 0 3px rgba(255, 59, 107, 0.12); }
.vault-input-wrap.vault-invalid:focus-within { border-color: #ff3b6b; box-shadow: 0 0 0 3px rgba(255, 59, 107, 0.12); }
.vault-input-suffix { padding: 0 4px 0 2px; color: #7d7d85; font-weight: 700; font-size: 13px; }

.vault-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-size: 15px;
    padding: 14px 12px;
    font-family: inherit;
}

.vault-input::placeholder { color: #5a5a62; }

.vault-max {
    margin: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #c5c5c5;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: 0.2s;
    flex-shrink: 0;
}

.vault-max:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.32);
    color: #fff;
}

.vault-pw-field .vault-input {
    width: 100%;
    background: linear-gradient(145deg, #232325, #1c1c1e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
}

.vault-pw-field .vault-input:focus { border-color: #00ffcc; box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.12); }

.vault-hint { font-size: 12px; color: #7d7d85; margin-top: 7px; }

.vault-msg { min-height: 0; font-size: 13px; border-radius: 10px; overflow: hidden; transition: 0.2s; }
.vault-msg.show { padding: 10px 12px; margin-bottom: 14px; }
.vault-msg.err { background: rgba(255, 59, 107, 0.12); border: 1px solid rgba(255, 59, 107, 0.35); color: #ff8aa6; }
.vault-msg.ok { background: rgba(0, 255, 204, 0.1); border: 1px solid rgba(0, 255, 204, 0.35); color: #00ffcc; }

.vault-submit {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(0, 255, 204, 0.4);
    border-radius: 13px;
    font-size: 15px;
    font-weight: 700;
    color: #00ffcc;
    background: rgba(0, 255, 204, 0.1);
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 12px 32px rgb(0 255 204 / 0%), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.vault-submit:hover:not(:disabled) { background: rgba(0, 255, 204, 0.2); }
.vault-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.vault-round-note {
    display: none;
    margin: -4px 0 16px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #00ffcc;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 8px;
}

.vault-round-note i { margin-right: 6px; }

@media (max-width: 480px) {
    .vault-modal .vault-modal-body { padding: 12px; }
    .vault-section { padding: 18px; border-radius: 20px; }
}
