/* =========================================================
   WooCommerce My Account — custom skin
   Adapted from my-account.html mockup
   Place at: assets/css/woocommerce-account.css
   Enqueued conditionally on the My Account page (see functions.php)
   ========================================================= */

:root{
    --ink:#1c1b19;
    --paper:#f8f6f2;
    --line:#e7e2d9;
    --muted:#857f74;
    --rust:#00baba;
    --rust-dark:#009e9e;
    --rust-soft:#e6f7f7;
    --teal:#2c4a47;
    --teal-soft:#eaf0ef;
    --gold:#c98f3c;
    --gold-soft:#fdf5e8;
    --radius:14px;
}

/* ===== Page wrapper ===== */
.woocommerce-account .page-title-bar{
    border-bottom:1px solid var(--line);
    padding-bottom:20px;
    margin-bottom:32px;
}
.woocommerce-account .page-title-bar h1{font-size:22px;font-weight:800;}
.woocommerce-account .page-title-bar p{font-size:13px;color:var(--muted);margin-top:4px;}

.woocommerce-account .acc-wrap{
    display:flex;
    gap:24px;
    align-items:flex-start;
    font-family:'Vazirmatn',sans-serif;
    color:var(--ink);
}
.woocommerce-account .acc-sidebar{
    flex:0 0 280px;
    position:sticky;
    top:24px;
}
.woocommerce-account .acc-content{flex:1 1 0%; width:100%; min-width:0;}

@media (max-width:900px){
    .woocommerce-account .acc-wrap{flex-direction:column;}
    .woocommerce-account .acc-sidebar{flex:1 1 auto; width:100%; position:static;}
}

/* ===== User card / nav (replaces woocommerce_account_navigation) ===== */
.user-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    margin-bottom:16px;
}
.user-card-header{
    background:var(--ink);
    padding:24px 20px 20px;
    text-align:center;
}
.avatar-ring{
    width:72px;height:72px;border-radius:50%;
    border:3px solid rgba(255,255,255,.2);
    background:var(--rust);
    display:flex;align-items:center;justify-content:center;
    font-size:26px;font-weight:800;color:#fff;
    margin:0 auto 12px;letter-spacing:-1px;
    overflow:hidden;
}
.avatar-ring img{width:100%;height:100%;object-fit:cover;}
.user-card-header h5{font-size:15px;font-weight:700;color:#fff;margin-bottom:3px;}
.user-card-header span{font-size:12px;color:#b5aea2;}
.user-card-body{padding:0;}

.acc-nav-item{
    display:flex;align-items:center;gap:10px;
    padding:13px 18px;
    font-size:14px;font-weight:600;
    border-bottom:1px solid var(--line);
    color:var(--ink);
    transition:.15s;
}
.acc-nav-item:last-child{border-bottom:none;}
.acc-nav-item .nav-icon{
    width:32px;height:32px;border-radius:8px;
    background:var(--paper);
    display:flex;align-items:center;justify-content:center;
    font-size:15px;flex-shrink:0;transition:.15s;
}
.acc-nav-item:hover{background:var(--paper);}
.acc-nav-item:hover .nav-icon{background:var(--line);}
.acc-nav-item .nav-label{flex:1;}
li.is-active .acc-nav-item,
.woocommerce-MyAccount-navigation-link--active .acc-nav-item{
    background:var(--rust-soft);color:var(--rust);
}
li.is-active .acc-nav-item .nav-icon,
.woocommerce-MyAccount-navigation-link--active .acc-nav-item .nav-icon{
    background:rgba(0,186,186,.12);
}

.loyalty-card{
    background:var(--ink);border-radius:var(--radius);
    padding:18px 20px;color:#fff;
}
.loyalty-card .lc-label{font-size:11.5px;color:#b5aea2;margin-bottom:4px;}
.loyalty-card .lc-pts{font-size:28px;font-weight:800;color:#fff;letter-spacing:-1px;margin-bottom:14px;}
.loyalty-card .lc-pts span{font-size:14px;font-weight:500;color:#b5aea2;}
.progress-bar-custom{background:rgba(255,255,255,.15);border-radius:4px;height:5px;overflow:hidden;margin-bottom:8px;}
.progress-bar-fill{height:100%;background:var(--gold);border-radius:4px;}
.loyalty-card .lc-meta{display:flex;justify-content:space-between;font-size:11.5px;color:#b5aea2;}
.loyalty-card .lc-meta span:last-child{color:var(--gold);}

/* ===== Content cards (wrap real WooCommerce content) ===== */
.content-card{
    background:#fff;border:1px solid var(--line);border-radius:var(--radius);
    margin-bottom:20px;overflow:hidden;
}
.content-card-header{
    padding:18px 24px;border-bottom:1px solid var(--line);
    display:flex;align-items:center;justify-content:space-between;
}
.content-card-header h2{font-size:16px;font-weight:700;}
.content-card-body{padding:24px;}

/* stats row on dashboard */
.stats-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px;}
.stat-box{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:16px 14px;text-align:center;}
.stat-box .stat-val{font-size:22px;font-weight:800;color:var(--ink);letter-spacing:-1px;margin-bottom:4px;}
.stat-box .stat-label{font-size:11.5px;color:var(--muted);font-weight:600;}

/* order rows (used inside dashboard recent-orders list) */
.order-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line);}
.order-row:last-child{border-bottom:none;}
.order-thumb{
    width:52px;height:52px;border-radius:8px;background:var(--paper);
    border:1px solid var(--line);display:flex;align-items:center;justify-content:center;
    font-size:22px;flex-shrink:0;
}
.order-info{flex:1;min-width:0;}
.order-info .order-name{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:3px;}
.order-info .order-meta{font-size:12px;color:var(--muted);}
.order-info .order-meta span{margin-left:10px;}
.order-status{font-size:11.5px;font-weight:700;padding:4px 10px;border-radius:20px;flex-shrink:0;white-space:nowrap;}
.status-completed,.status-delivered{background:var(--teal-soft);color:var(--teal);}
.status-processing,.status-pending,.status-on-hold{background:var(--gold-soft);color:#8a5e1c;}
.status-cancelled,.status-failed,.status-refunded{background:#fdf0f0;color:#a33;}
.order-price{font-size:14px;font-weight:700;text-align:left;white-space:nowrap;flex-shrink:0;min-width:80px;}

/* ===== Re-skin native WooCommerce order table / forms to match cards ===== */
.acc-content table.shop_table{
    width:100%;border-collapse:collapse;font-size:13.5px;
}
.acc-content table.shop_table th{
    text-align:right;font-size:11.5px;color:var(--muted);font-weight:700;
    padding:10px 4px;border-bottom:1px solid var(--line);
}
.acc-content table.shop_table td{padding:12px 4px;border-bottom:1px solid var(--line);}
.acc-content table.shop_table tr:last-child td{border-bottom:none;}
.acc-content .woocommerce-button,
.acc-content .button{
    background:var(--rust);border:none;color:#fff !important;font-weight:700;
    border-radius:10px;padding:10px 20px;font-size:13.5px;
    font-family:'Vazirmatn',sans-serif;transition:.15s;cursor:pointer;
}
.acc-content .woocommerce-button:hover,
.acc-content .button:hover{background:var(--rust-dark);color:#fff !important;}

.acc-content .woocommerce-Address{
    border:1.5px solid var(--line);border-radius:10px;padding:16px;
    position:relative;
}
.acc-content .woocommerce-Addresses{
    display:grid !important;grid-template-columns:1fr 1fr;gap:14px;
    align-items:start;
}
.acc-content .woocommerce-Addresses::before,
.acc-content .woocommerce-Addresses::after{
    content:none !important;display:none !important;
}
/* Bootstrap defines .col-1 / .col-2 as 12-col grid widths (8.33%, 16.66%)
   which collides with WooCommerce's own .col-1 / .col-2 address-column
   classes. Force them back to full width inside our grid. */
.acc-content .woocommerce-Addresses > .col-1,
.acc-content .woocommerce-Addresses > .col-2,
.acc-content .woocommerce-Addresses > [class*="u-column"]{
    width:100% !important;
    max-width:100% !important;
    float:none !important;
    flex:none !important;
    padding:0 !important;
    margin:0 !important;
}
.acc-content .woocommerce-Address-title,
.acc-content .woocommerce-Address-title.title{
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    margin-bottom:10px;
    order:-1; /* show the type label + edit button above the address text */
}
.acc-content .woocommerce-Address-title h2,
.acc-content .woocommerce-Address-title h3{
    font-size:11px;font-weight:700;color:var(--muted);
    text-transform:uppercase;letter-spacing:.02em;margin:0;
    display:flex;align-items:center;gap:6px;
}
/* type icons, matching the mockup's 🏠 / 🏢 */
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address-title h2::before,
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address-title h3::before{
    content:"🏠";font-size:13px;
}
.acc-content .woocommerce-Addresses > :nth-child(2) .woocommerce-Address-title h2::before,
.acc-content .woocommerce-Addresses > :nth-child(2) .woocommerce-Address-title h3::before{
    content:"🏢";font-size:13px;
}
.acc-content .woocommerce-Address-title a.edit,
.acc-content .woocommerce-Address-title a.delete{
    font-size:12px;font-weight:600;
    padding:5px 12px;border-radius:7px;
    border:1.5px solid var(--line);
    background:#fff;color:var(--ink);
    transition:.15s;flex-shrink:0;
}
.acc-content .woocommerce-Address-title a.edit:hover,
.acc-content .woocommerce-Address-title a.delete:hover{border-color:var(--ink);}
.acc-content .woocommerce-Address-title a.delete{color:#a33;border-color:#f0cccc;}
.acc-content .woocommerce-Address-title a.delete:hover{border-color:#a33;}

/* highlight the billing address like the "default" card in the mockup */
.acc-content .woocommerce-Addresses > :nth-child(1).woocommerce-Address,
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address{
    border-color:var(--teal);
    background:var(--teal-soft);
}
.acc-content .woocommerce-Addresses > :nth-child(1) .woocommerce-Address-title::after{
    content:"پیش‌فرض";
    background:var(--teal);color:#fff;
    font-size:10px;font-weight:700;
    padding:2px 7px;border-radius:20px;
    margin-inline-end:auto;
}

.acc-content address{
    font-size:13px;color:var(--muted);line-height:1.8;
    font-style:normal;
}
.acc-content address strong{
    display:block;font-size:15px;font-weight:700;color:var(--ink);
    margin-bottom:4px;
}

.acc-content .woocommerce-form-row{margin-bottom:18px;}
.acc-content .woocommerce-form-row label{
    display:block;font-size:13px;font-weight:600;margin-bottom:7px;color:var(--ink);
}
.acc-content input.input-text,
.acc-content select{
    width:100%;border:1.5px solid var(--line);border-radius:10px;
    padding:0 14px;height:46px;font-family:'Vazirmatn',sans-serif;
    font-size:14.5px;color:var(--ink);background:#fff;outline:none;transition:.2s;
}
.acc-content input.input-text:focus,
.acc-content select:focus{border-color:var(--ink);}

@media(max-width:768px){
    .stats-row{grid-template-columns:repeat(3,1fr);}
    .acc-content .woocommerce-Addresses{grid-template-columns:1fr;}
}