/* =====================================================================
   Serva — Wallet (full-page redesign)
   Preserves all existing form IDs; just re-wraps the deposit form
   in a modern hero + balance card + visual method picker + steppers.
   ===================================================================== */

.wallet-page-wrap {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(0, 180, 255, 0.06), transparent 40%),
        radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.05), transparent 50%),
        #030816;
}

.wallet-page-shell {
    max-width: none;
    margin: 0;
    padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* --- Top bar (minimal back link) ----------------------------------------- */

.wallet-top-bar {
    display: flex;
    align-items: center;
}

.wallet-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.18s ease;
}

.wallet-back-link:hover {
    border-color: rgba(0, 180, 255, 0.4);
    color: #cfeeff;
    background: rgba(0, 180, 255, 0.06);
}

/* --- Hero ---------------------------------------------------------------- */

.wallet-page-hero {
    border: 1px solid rgba(0, 180, 255, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(0, 180, 255, 0.16), transparent 34%),
        linear-gradient(140deg, rgba(6, 14, 32, 0.96), rgba(4, 8, 20, 0.98));
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
    padding: 2rem;
}

.wallet-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 180, 255, 0.12);
    border: 1px solid rgba(0, 180, 255, 0.28);
    color: #5ed3ff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.wallet-page-hero h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(1.85rem, 4.6vw, 3rem);
    line-height: 1.08;
}

.wallet-page-hero p {
    margin: 0;
    max-width: 720px;
    color: var(--text-secondary);
    line-height: 1.85;
}

.wallet-page-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.35rem;
}

.wallet-page-hero-actions .btn-primary,
.wallet-page-hero-actions .btn-secondary {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Balance Card -------------------------------------------------------- */

.wallet-balance-card {
    border-radius: 22px;
    padding: 1.6rem 1.75rem;
    border: 1px solid rgba(34, 197, 94, 0.32);
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 50%),
        radial-gradient(circle at bottom left, rgba(0, 180, 255, 0.12), transparent 55%),
        linear-gradient(150deg, rgba(8, 24, 20, 0.96), rgba(4, 12, 14, 0.94));
    box-shadow: 0 20px 50px rgba(34, 197, 94, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.wallet-balance-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #6ee59f;
    font-weight: 700;
    font-size: 0.92rem;
}

.wallet-balance-value {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.05;
}

.wallet-balance-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

/* --- Form Shell ---------------------------------------------------------- */

.wallet-deposit-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-section {
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(8, 16, 36, 0.96), rgba(4, 8, 20, 0.94));
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.wallet-section-head {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.25rem;
}

.wallet-section-head h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.wallet-section-head p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
}

/* --- Method picker (visual cards) --------------------------------------- */

.wallet-method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.wallet-method-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    cursor: pointer;
    transition: 0.18s ease;
    text-align: start;
    min-height: 80px;
}

.wallet-method-card:hover {
    border-color: rgba(0, 180, 255, 0.42);
    background: rgba(0, 180, 255, 0.06);
    transform: translateY(-2px);
}

.wallet-method-card.is-active {
    border-color: rgba(0, 200, 200, 0.6);
    background: linear-gradient(135deg, rgba(0, 200, 200, 0.18), rgba(0, 120, 200, 0.14));
    box-shadow: 0 0 0 1px rgba(0, 200, 200, 0.25) inset, 0 12px 30px rgba(0, 200, 200, 0.18);
}

.wallet-method-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet-method-card-icon[data-tone="shamcash"] {
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.18), rgba(0, 120, 200, 0.14));
    border-color: rgba(0, 180, 255, 0.32);
}

.wallet-method-card-icon[data-tone="orange"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255, 99, 71, 0.14));
    border-color: rgba(245, 158, 11, 0.32);
}

.wallet-method-card-icon[data-tone="usdt"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(6, 182, 212, 0.14));
    border-color: rgba(34, 197, 94, 0.32);
}

.wallet-method-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.wallet-method-card-body strong {
    color: #fff;
    font-size: 1rem;
    line-height: 1.25;
}

.wallet-method-card-body span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.wallet-method-card-badge {
    position: absolute;
    top: 0.55rem;
    inset-inline-end: 0.55rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd166, #f5be4f);
    color: #1a1207;
    box-shadow: 0 6px 14px rgba(245, 190, 79, 0.3);
}

/* USDT network sub-selector */

.wallet-usdt-networks {
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px dashed rgba(34, 197, 94, 0.3);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.wallet-usdt-networks[hidden] { display: none !important; }

.wallet-usdt-networks-label {
    color: #6ee59f;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.wallet-usdt-networks-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.wallet-network-chip {
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.18s ease;
    font-family: inherit;
}

.wallet-network-chip:hover {
    color: #6ee59f;
    background: rgba(34, 197, 94, 0.08);
}

.wallet-network-chip.is-active {
    background: rgba(34, 197, 94, 0.22);
    color: #fff;
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3) inset;
}

/* Hide the legacy native select wrapper visually
   (still in the DOM so wallet.js continues to work). */
.wallet-method-select-wrap {
    display: none;
}

/* --- ShamCash stepper (restyled) --------------------------------------- */

.shamcash-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.shamcash-step-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    text-align: center;
    transition: 0.2s ease;
    font-size: 0.85rem;
}

.shamcash-step-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-size: 0.85rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.shamcash-step-chip strong {
    font-size: 0.88rem;
    font-weight: 700;
}

.shamcash-step-chip.is-active {
    color: #fff;
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.18);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18) inset;
}

.shamcash-step-chip.is-complete {
    color: #9fe870;
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.12);
}

.preload-shamcash #depositAmountSection > .wallet-section-head h3,
.preload-shamcash #depositAmountSection > h4:first-child {
    display: none;
}

.shamcash-step-panel-title {
    margin: 0 0 0.75rem;
    font-size: 1.02rem;
}

.shamcash-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.shamcash-step-actions .btn-primary,
.shamcash-step-actions .btn-secondary {
    min-width: 150px;
    justify-content: center;
}

/* --- Submit button ------------------------------------------------------ */

.wallet-submit-btn {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 900px) {
    .wallet-method-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .wallet-page-shell {
        padding: 1.5rem clamp(0.85rem, 4vw, 1.5rem) 3rem;
    }
    .wallet-page-hero,
    .wallet-balance-card,
    .wallet-section {
        padding: 1.25rem;
        border-radius: 20px;
    }
    .wallet-method-grid {
        grid-template-columns: 1fr;
    }
    .shamcash-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .shamcash-step-chip {
        justify-content: flex-start;
    }
    .shamcash-step-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .shamcash-step-actions .btn-primary,
    .shamcash-step-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wallet-method-card {
        padding: 0.9rem;
    }
    .wallet-method-card-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }
}
