/* =====================================================================
   Wholesale Shop – My Account for wholesale customers
   File: assets/css/ws-account.css

   Markup: includes/class-ws-account.php. WooCommerce's own navigation is
   styled through the body class .ws-wholesale-account (added only for
   wholesale customers); the content blocks live inside .ws-ui.
   ===================================================================== */

/* ---------- layout: navigation + content ---------- */
body.ws-wholesale-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    max-width: 1180px;
}
body.ws-wholesale-account .woocommerce:has(> .woocommerce-MyAccount-navigation)::before,
body.ws-wholesale-account .woocommerce:has(> .woocommerce-MyAccount-navigation)::after { display: none; }
body.ws-wholesale-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > :not(.woocommerce-MyAccount-navigation):not(.woocommerce-MyAccount-content) { grid-column: 1 / -1; }
body.ws-wholesale-account .woocommerce-MyAccount-navigation,
body.ws-wholesale-account .woocommerce-MyAccount-content { float: none; width: auto; min-width: 0; margin: 0; }

/* ---------- navigation ---------- */
body.ws-wholesale-account .woocommerce-MyAccount-navigation ul {
    display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none;
    background: #fff; border: 1px solid var(--ws-ln);
}
body.ws-wholesale-account .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; border: 0; list-style: none; }
body.ws-wholesale-account .woocommerce-MyAccount-navigation li a {
    display: block; padding: 11px 14px; white-space: nowrap; text-decoration: none !important;
    font: 500 13.5px var(--ws-h); text-transform: uppercase; letter-spacing: .5px; color: #555;
    border-inline-start: 3px solid transparent;
}
body.ws-wholesale-account .woocommerce-MyAccount-navigation li a:hover { color: var(--ws-k); background: #FAFAFA; }
body.ws-wholesale-account .woocommerce-MyAccount-navigation li.is-active a {
    color: var(--ws-k); background: var(--ws-os); border-inline-start-color: var(--ws-o);
}
body.ws-wholesale-account.rtl .woocommerce-MyAccount-navigation li a,
[dir="rtl"] body.ws-wholesale-account .woocommerce-MyAccount-navigation li a { text-transform: none; letter-spacing: 0; }

/* ---------- content blocks ---------- */
.ws-ui.ws-acc { min-width: 0; }
.ws-acc .ws-title { margin-bottom: 4px; }
.ws-acc .ws-acc-lnk { color: var(--ws-o); text-decoration: none; font: 500 13px var(--ws-b); text-transform: none; letter-spacing: 0; }
.ws-acc .ws-acc-lnk:hover { text-decoration: underline; }
.ws-acc .ws-acc-sec { justify-content: space-between; margin-top: 18px; }

/* dark call-to-action strip */
.ws-acc .ws-acc-cta {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 16px; margin-bottom: 12px; background: var(--ws-k); color: #fff;
}
.ws-acc .ws-acc-cta-t b { display: block; font: 600 17px var(--ws-h); }
.ws-acc .ws-acc-cta-t > span { color: #BBB; font-size: 13px; }
.ws-acc .ws-acc-cta-t .ws-price { color: #fff; }
.ws-acc .ws-acc-cta-b { display: flex; gap: 8px; }
.ws-acc .ws-acc-cta .ws-btn-light { border-color: #fff; color: #fff; }
.ws-acc .ws-acc-cta .ws-btn-light:hover { background: #fff; color: var(--ws-k); }

/* KPI cards */
.ws-acc .ws-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ws-acc .ws-kpis.ws-kpis-2 { grid-template-columns: repeat(2, 1fr); }
.ws-acc .ws-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; background: #fff; border: 1px solid var(--ws-ln); }
.ws-acc .ws-kpi small { color: var(--ws-mu); font: 500 11px var(--ws-h); text-transform: uppercase; letter-spacing: .6px; }
[dir="rtl"] .ws-acc .ws-kpi small { text-transform: none; letter-spacing: 0; font-size: 12px; }
.ws-acc .ws-kpi > b { font: 600 24px var(--ws-h); color: var(--ws-k); }
.ws-acc .ws-kpi > b.ws-kpi-name { font-size: 17px; }
.ws-acc .ws-kpi > span { font-size: 12.5px; color: var(--ws-mu); overflow-wrap: anywhere; }
.ws-acc .ws-kpi > span a { color: inherit; text-decoration: none; }
.ws-acc .ws-kpi > span a:hover { color: var(--ws-o); }
.ws-acc .ws-kpi > span.ws-num { align-self: flex-start; }
.ws-acc .ws-kpi-a { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* order rows */
.ws-acc .ws-ao { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 9px 12px; }
.ws-acc .ws-ao-1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ws-acc .ws-ao-1 > b { font: 600 15px var(--ws-h); color: var(--ws-k); }
.ws-acc .ws-ao-d { font-size: 12.5px; }
.ws-acc .ws-ao-2 { grid-column: 1; font-size: 12.5px; color: var(--ws-mu); }
.ws-acc .ws-ao-2 b { color: var(--ws-k); font: 600 14px var(--ws-h); }
.ws-acc .ws-ao-3 { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 6px; }

/* orders filter */
.ws-acc .ws-acc-filter { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.ws-acc .ws-acc-filter a { padding: 5px 12px; background: #fff; border: 1px solid var(--ws-ln); font-size: 12.5px; color: var(--ws-ink); text-decoration: none; white-space: nowrap; }
.ws-acc .ws-acc-filter a.ws-on { background: var(--ws-k); border-color: var(--ws-k); color: #fff; }
.ws-acc .ws-acc-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }

/* business details */
.ws-acc .ws-field > label { margin: 0; line-height: 1.3; }
.ws-acc .ws-acc-hint { font-size: 12px; margin: -2px 0 10px; }
.ws-acc .ws-field select { appearance: auto; }
.ws-acc .ws-acc-addr-1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.ws-acc .ws-acc-addr-2 { font-size: 12.5px; color: var(--ws-mu); margin-top: 2px; line-height: 1.4; }
.ws-acc .ws-acc-pw { margin: 14px 0 0; }

/* notices printed above the wholesale cart (reorder result) */
.ws-ui.ws-acc-notices { max-width: 1180px; margin-inline: auto; }
.ws-ui.ws-acc-notices .woocommerce-message,
.ws-ui.ws-acc-notices .woocommerce-info,
.ws-ui.ws-acc-notices .woocommerce-error {
    margin: 0 0 12px; padding: 10px 12px; list-style: none; font-size: 13px;
    background: var(--ws-oks); border: 0; border-inline-start: 3px solid var(--ws-ok); color: #14532d;
}
.ws-ui.ws-acc-notices .woocommerce-info { background: var(--ws-was); border-inline-start-color: var(--ws-wa); color: #713f12; }
.ws-ui.ws-acc-notices .woocommerce-error { background: var(--ws-ers); border-inline-start-color: var(--ws-er); color: #7f1d1d; }
.ws-ui.ws-acc-notices .woocommerce-message::before,
.ws-ui.ws-acc-notices .woocommerce-info::before,
.ws-ui.ws-acc-notices .woocommerce-error::before { display: none; }

/* WooCommerce notices inside the account */
body.ws-wholesale-account .woocommerce-MyAccount-content .woocommerce-message,
body.ws-wholesale-account .woocommerce-MyAccount-content .woocommerce-error,
body.ws-wholesale-account .woocommerce-MyAccount-content .woocommerce-info {
    font-family: var(--ws-b); font-size: 13px; border-radius: 0;
}

/* ---------- mobile ---------- */
@media (max-width: 700px) {
    body.ws-wholesale-account .woocommerce:has(> .woocommerce-MyAccount-navigation) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    body.ws-wholesale-account .woocommerce-MyAccount-navigation { min-width: 0; }
    body.ws-wholesale-account .woocommerce-MyAccount-navigation ul {
        flex-direction: row; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
        border-inline: 0; border-top: 0;
    }
    body.ws-wholesale-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
    body.ws-wholesale-account .woocommerce-MyAccount-navigation li a {
        padding: 10px 12px; font-size: 12.5px; border-inline-start: 0; border-bottom: 3px solid transparent;
    }
    body.ws-wholesale-account .woocommerce-MyAccount-navigation li.is-active a { background: none; border-bottom-color: var(--ws-o); }

    .ws-acc .ws-acc-cta { padding: 12px; }
    .ws-acc .ws-acc-cta-t b { font-size: 15px; }
    .ws-acc .ws-acc-cta-b { width: 100%; }
    .ws-acc .ws-acc-cta-b .ws-btn { flex: 1; padding: 0 12px; }

    .ws-acc .ws-kpis, .ws-acc .ws-kpis.ws-kpis-2 { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ws-acc .ws-kpis .ws-kpi-mgr { grid-column: 1 / -1; order: 3; }
    .ws-acc .ws-kpi { padding: 10px; }
    .ws-acc .ws-kpi > b { font-size: 20px; }

    /* full rows: actions under the text, Reorder takes the room */
    .ws-acc .ws-ao { grid-template-columns: 1fr; }
    .ws-acc .ws-ao-3 { grid-column: 1; grid-row: auto; margin-top: 6px; }
    .ws-acc .ws-ao-3 .ws-btn-primary { flex: 1; }
    /* dashboard rows: Reorder stays beside the order */
    .ws-acc .ws-ao.ws-ao-compact { grid-template-columns: 1fr auto; }
    .ws-acc .ws-ao.ws-ao-compact .ws-ao-3 { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
    .ws-acc .ws-ao.ws-ao-compact .ws-ao-3 .ws-btn-primary { flex: 0 0 auto; }
}
