/**
 * OceanVPS Customer Layout — Premium Wallet presentation layer.
 *
 * Scoped entirely under .ovps-wallet-view so it only restyles the wallet view
 * rendered inside the Customer Layout dashboard shell. It targets the public
 * markup emitted by the [oceanvps_wallet] shortcode (.ovwallet-*) plus the
 * Customer-Layout-owned wrapper elements. Presentation only — no wallet logic,
 * data, form fields, names, IDs, nonces or payment behaviour are changed.
 */

.ovps-wallet-view {
    --owp-teal-900: #0e3b3a;
    --owp-teal-700: #145b56;
    --owp-teal-600: #1a6b64;
    --owp-gold: #c8a45a;
    --owp-gold-soft: #efe2c4;
    --owp-cream: #fbf7ee;
    --owp-cream-2: #f6efe0;
    --owp-ink: #1e2a29;
    --owp-muted: #6b7a78;
    --owp-border: #e7e1d3;
    --owp-card: #ffffff;
    --owp-credit: #1f7a52;
    --owp-credit-bg: #e6f4ec;
    --owp-debit: #b23b3b;
    --owp-debit-bg: #fbe9e9;
    --owp-radius: 16px;
    --owp-shadow: 0 6px 20px rgba(14, 59, 58, .07);
    --owp-shadow-sm: 0 2px 8px rgba(14, 59, 58, .06);
    color: var(--owp-ink);
}

/* ---------- Header ---------- */
.ovps-wallet-view .ovps-wallet-header { margin: 0 0 20px; }
.ovps-wallet-view .ovps-breadcrumb {
    font-size: 12.5px; color: var(--owp-muted); margin-bottom: 10px; display: flex; gap: 8px; align-items: center;
}
.ovps-wallet-view .ovps-breadcrumb a { color: var(--owp-teal-700); text-decoration: none; }
.ovps-wallet-view .ovps-breadcrumb a:hover { text-decoration: underline; }
.ovps-wallet-view .ovps-breadcrumb-sep { color: var(--owp-gold); }
.ovps-wallet-view .ovps-wallet-header h1 {
    margin: 0 0 4px; font-size: 28px; font-weight: 700; letter-spacing: -.01em; color: var(--owp-teal-900);
}
.ovps-wallet-view .ovps-wallet-subtitle { margin: -6px 0 18px; color: var(--owp-muted); font-size: 14.5px; }

/* ---------- Layout grid ---------- */
.ovps-wallet-view .ovwallet-wrap { display: flex; flex-direction: column; gap: 18px; }

/* Generic panel refinement inside the wallet */
.ovps-wallet-view .ovps-panel {
    background: var(--owp-card);
    border: 1px solid var(--owp-border);
    border-radius: var(--owp-radius);
    box-shadow: var(--owp-shadow-sm);
    padding: 22px 24px;
}

/* ---------- Balance card ---------- */
.ovps-wallet-view .ovwallet-balance-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--owp-cream) 0%, var(--owp-cream-2) 100%);
    border: 1px solid var(--owp-gold-soft);
    border-radius: var(--owp-radius);
    box-shadow: var(--owp-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 28px;
}
/* subtle decorative wave */
.ovps-wallet-view .ovwallet-balance-card::after {
    content: "";
    position: absolute;
    right: -40px; top: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle at center, rgba(200,164,90,.18), rgba(200,164,90,0) 70%);
    pointer-events: none;
}
.ovps-wallet-view .ovwallet-balance-inner { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.ovps-wallet-view .ovwallet-balance-inner::before {
    content: "▱";
    font-size: 26px;
    color: var(--owp-gold);
    line-height: 1;
    margin-bottom: 4px;
}
.ovps-wallet-view .ovwallet-balance-label {
    text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; color: var(--owp-muted);
}
.ovps-wallet-view .ovwallet-balance-value {
    font-size: 40px; font-weight: 800; line-height: 1.05; color: var(--owp-teal-900); letter-spacing: -.02em;
}
.ovps-wallet-view .ovwallet-balance-value .woocommerce-Price-currencySymbol { font-weight: 700; }

/* ---------- Buttons (teal) ---------- */
.ovps-wallet-view .ovps-inline-button,
.ovps-wallet-view .ovwallet-add-button,
.ovps-wallet-view .ovwallet-jump-add {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--owp-teal-700); color: #fff !important;
    border: 0; border-radius: 10px;
    padding: 12px 20px; font-size: 14px; font-weight: 600; text-decoration: none;
    cursor: pointer; transition: background .15s ease, transform .05s ease;
    box-shadow: 0 2px 6px rgba(14,59,58,.18);
}
.ovps-wallet-view .ovps-inline-button:hover,
.ovps-wallet-view .ovwallet-add-button:hover,
.ovps-wallet-view .ovwallet-jump-add:hover { background: var(--owp-teal-900); }
.ovps-wallet-view .ovwallet-add-button:active { transform: translateY(1px); }
.ovps-wallet-view .ovwallet-jump-add { position: relative; z-index: 1; }

/* ---------- Add funds ---------- */
.ovps-wallet-view .ovwallet-add-funds h2,
.ovps-wallet-view .ovwallet-history h2 {
    margin: 0 0 14px; font-size: 18px; font-weight: 700; color: var(--owp-teal-900);
    display: flex; align-items: center; gap: 8px;
}
.ovps-wallet-view .ovwallet-add-funds-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.ovps-wallet-view .ovwallet-add-funds-form label {
    display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--owp-ink);
}
.ovps-wallet-view .ovwallet-add-funds-form input[type="number"] {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--owp-border); border-radius: 10px;
    padding: 12px 14px; font-size: 16px; background: #fff; color: var(--owp-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ovps-wallet-view .ovwallet-add-funds-form input[type="number"]:focus {
    outline: none; border-color: var(--owp-teal-600); box-shadow: 0 0 0 3px rgba(26,107,100,.12);
}
.ovps-wallet-view .ovwallet-currency { color: var(--owp-muted); font-weight: 700; }
.ovps-wallet-view .ovwallet-limits { margin: 0; font-size: 12.5px; color: var(--owp-muted); }
.ovps-wallet-view .ovwallet-instructions { margin: 0 0 6px; font-size: 13px; color: var(--owp-muted); }

/* quick-amount chips injected by wallet-premium.js (presentation only) */
.ovps-wallet-view .owp-quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.ovps-wallet-view .owp-quick-amount {
    border: 1px solid var(--owp-border); background: var(--owp-cream);
    color: var(--owp-teal-900); border-radius: 999px; padding: 7px 14px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all .12s ease;
}
.ovps-wallet-view .owp-quick-amount:hover { border-color: var(--owp-gold); background: var(--owp-gold-soft); }
.ovps-wallet-view .owp-quick-amount.is-active { background: var(--owp-teal-700); color: #fff; border-color: var(--owp-teal-700); }

/* ---------- Alerts ---------- */
.ovps-wallet-view .ovwallet-alert { border-radius: 10px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 14px; }
.ovps-wallet-view .ovwallet-alert-error { background: var(--owp-debit-bg); color: var(--owp-debit); border: 1px solid #f1c9c9; }
.ovps-wallet-view .ovwallet-alert-success { background: var(--owp-credit-bg); color: var(--owp-credit); border: 1px solid #c6e6d3; }

/* ---------- Transaction history ---------- */
.ovps-wallet-view .ovps-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.ovps-wallet-view .ovwallet-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 640px; }
.ovps-wallet-view .ovwallet-table thead th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--owp-muted); font-weight: 700; padding: 12px 14px;
    background: var(--owp-cream); border-bottom: 1px solid var(--owp-border);
}
.ovps-wallet-view .ovwallet-table tbody td { padding: 13px 14px; border-bottom: 1px solid #f1eee6; vertical-align: middle; }
.ovps-wallet-view .ovwallet-table tbody tr:last-child td { border-bottom: 0; }
.ovps-wallet-view .ovwallet-table tbody tr:hover td { background: #fcfaf4; }
.ovps-wallet-view .ovwallet-type-badge {
    display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.ovps-wallet-view .ovwallet-type-badge.ovwallet-credit { background: var(--owp-credit-bg); color: var(--owp-credit); }
.ovps-wallet-view .ovwallet-type-badge.ovwallet-debit { background: var(--owp-debit-bg); color: var(--owp-debit); }
.ovps-wallet-view td.ovwallet-credit { color: var(--owp-credit); font-weight: 700; }
.ovps-wallet-view td.ovwallet-debit { color: var(--owp-debit); font-weight: 700; }
.ovps-wallet-view .ovwallet-empty { color: var(--owp-muted); font-size: 14px; margin: 6px 0; }

/* ---------- Pagination ---------- */
.ovps-wallet-view .ovwallet-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ovps-wallet-view .ovwallet-page {
    min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px;
    border: 1px solid var(--owp-border); text-decoration: none; color: var(--owp-teal-900); font-size: 13px; font-weight: 600;
}
.ovps-wallet-view .ovwallet-page:hover { border-color: var(--owp-gold); background: var(--owp-cream); }
.ovps-wallet-view .ovwallet-page.is-current { background: var(--owp-teal-700); color: #fff; border-color: var(--owp-teal-700); }

/* ---------- Benefits card ---------- */
.ovps-wallet-view .ovps-wallet-benefits { margin-top: 4px; }
.ovps-wallet-view .ovps-wallet-benefits-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; color: var(--owp-teal-900); }
.ovps-wallet-view .ovps-wallet-benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ovps-wallet-view .ovps-wallet-benefit { display: flex; gap: 12px; align-items: flex-start; }
.ovps-wallet-view .ovps-wallet-benefit-icon {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
    background: var(--owp-gold-soft); color: var(--owp-teal-900);
}
.ovps-wallet-view .ovps-wallet-benefit strong { display: block; font-size: 14px; color: var(--owp-ink); margin-bottom: 2px; }
.ovps-wallet-view .ovps-wallet-benefit small { color: var(--owp-muted); font-size: 12.5px; line-height: 1.4; }

.ovps-wallet-view .ovps-wallet-unavailable h2 { color: var(--owp-teal-900); margin-top: 0; }

/* ---------- Two-column area on wide screens (Add Funds + Benefits) ---------- */
@media (min-width: 1024px) {
    .ovps-wallet-view .ovps-wallet-benefits-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .ovps-wallet-view .ovps-wallet-benefits-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .ovps-wallet-view .ovps-wallet-header h1 { font-size: 23px; }
    .ovps-wallet-view .ovwallet-balance-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
    .ovps-wallet-view .ovwallet-balance-value { font-size: 33px; }
    .ovps-wallet-view .ovwallet-jump-add { width: 100%; }
    .ovps-wallet-view .ovwallet-add-button { width: 100%; }
    .ovps-wallet-view .ovps-wallet-benefits-grid { grid-template-columns: 1fr; }
    .ovps-wallet-view .ovps-panel { padding: 18px; }
}
