/* =====================================
   REMOVE WOOCOMMERCE DEFAULT
===================================== */
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none;
}
.woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
    float: none;
}
/* This plugin's own "My Account Page" widget/shortcode wraps everything in
   .caw-account-page-wrap (see CAW_Account_Page::page_shortcode() and
   CAW_MyAccount_Page_Widget) — no dependency on Elementor Pro's own "My Account"
   widget or its .e-my-account-tab wrapper class. */
.caw-account-page-wrap .woocommerce-MyAccount-content {
    float: inline-end;
    padding: 0;
    padding-inline-start: 0 !important;
    width: 100% !important;
    padding-left: 50px !important;
}
.woocommerce-MyAccount-content-wrapper p {
    display: none !important;
}

/* =====================================
   MAIN ACCOUNT
===================================== */
.caw-account-page-wrap {
    /* Every color/shape/font below is driven from these — override them from the
       "My Account Page" Elementor widget's Style tab instead of editing this file. */
    --caw-ap-accent: #000000;
    --caw-ap-accent-text: #ffffff;
    --caw-ap-muted-bg: #F5F5F5;
    --caw-ap-muted-text: #4D4D4D;
    --caw-ap-border: #dddddd;
    --caw-ap-radius: 5px;
    --caw-ap-font: "Satoshi", sans-serif;
}
.caw-account-page-wrap .woocommerce {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 535px;
    overflow: hidden;
}

/* =====================================
   SIDEBAR
===================================== */
.custom-account-sidebar {
    width: 360px;
    flex: 0 0 360px;
    background: var(--caw-ap-muted-bg);
    padding: 15px;
    box-sizing: border-box;
    border-radius: var(--caw-ap-radius);
    height: 100%;
}
.custom-account-sidebar a, .sidebar-active {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    line-height: 20px;
    color: var(--caw-ap-muted-text) !important;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    transition: 0.6s;
    margin-bottom: 2px;
    font-family: var(--caw-ap-font);
}
.sidebar-active {
    margin: 0;
    background: #fff;
    color: #000000 !important;
    font-weight: 700 !important;
}
.custom-account-sidebar a:hover {
    background: #fff;
    color: #000000 !important;
}
.custom-account-sidebar hr {
    border: 0;
    border-top: 1px solid var(--caw-ap-border);
    margin: 8px 15px;
}
.main-welcome-message h2 {
    font-size: 24px;
    line-height: 30px;
    font-weight: 700 !important;
    margin: 0 !important;
    margin-bottom: 17px !important;
}

/* =====================================
   CONTENT
===================================== */
.custom-account-main {
    flex: 1;
    min-width: 0;
}
.custom-account-main h2 {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    color: #111;
}

/* =====================================
   TABS
===================================== */
.custom-order-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}
.custom-order-tabs a {
    display: block;
    padding: 10px 15px;
    background: var(--caw-ap-muted-bg) !important;
    color: var(--caw-ap-muted-text) !important;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: var(--caw-ap-radius);
    transition: 0.6s;
    font-weight: 500 !important;
    font-family: var(--caw-ap-font) !important;
}
.custom-order-tabs a:hover {
    background: var(--caw-ap-accent) !important;
    color: var(--caw-ap-accent-text) !important;
}
.custom-order-tabs a.active {
    background: var(--caw-ap-accent) !important;
    color: var(--caw-ap-accent-text) !important;
    font-weight: 700 !important;
}

/* =====================================
   ORDER TABLE
===================================== */
.custom-orders {
    border: 1px solid var(--caw-ap-border);
    background: #fff;
    height: 535px;
}
.custom-orders-head,
.custom-order-row {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1.1fr .6fr 1fr 1.2fr .9fr;
    align-items: center;
}
.custom-orders-head {
    padding: 13px 18px;
    background: var(--caw-ap-muted-bg);
    font-size: 14px;
    font-weight: 700;
    color: #000;
    font-family: var(--caw-ap-font);
}
.custom-order-row {
    min-height: 58px;
    padding: 7px 18px;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    font-size: 14px;
    color: var(--caw-ap-muted-text);
    font-weight: 500;
    font-family: var(--caw-ap-font);
}
.custom-order-row:last-child {
    border-bottom: 0;
}

/* =====================================
   PRODUCT / STATUS
===================================== */
.custom-product {
    color: #333;
    text-transform: uppercase;
}
.custom-product small {
    display: block;
    margin-top: 3px;
    color: #777;
    font-size: 6px;
    text-transform: uppercase;
}
.custom-status {
    color: #2691DD;
    font-size: 14px;
    text-transform: uppercase;
}
.custom-status i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 3px;
    background: #008cff;
    border-radius: 50%;
}
.custom-view-order {
    color: #000000 !important;
    font-size: 14px;
    text-decoration: underline !important;
}

/* =====================================
   ORDER MODAL
===================================== */
.custom-order-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    background: rgba(0, 0, 0, .25);
}
.custom-order-modal:target {
    display: block;
}
.custom-modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 620px;
    max-width: 620px;
    height: 760px;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    padding: 22px;
    background: #fff;
    border: 1px solid #808080;
    box-sizing: border-box;
    border-radius: var(--caw-ap-radius);
}
.custom-modal-box h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700 !important;
    font-family: var(--caw-ap-font);
    margin-bottom: 15px !important;
}
.custom-modal-box hr {
    margin: 18px 0 16px;
    border: 0;
    border-top: 1px solid var(--caw-ap-border);
}
.custom-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    color: #000 !important;
    font-size: 34px;
    line-height: 1;
    text-decoration: none !important;
    font-weight: 400 !important;
}
.custom-modal-info {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
}
.custom-modal-info span, .custom-modal-info strong {
    padding: 6px 0;
    font-size: 14px;
    font-family: var(--caw-ap-font);
    text-transform: uppercase;
    line-height: 19px;
}
.custom-modal-info span { color: #000000; font-weight: 700; }
.custom-modal-info strong { color: #555; font-weight: 400; }
.custom-modal-products {
    margin: 15px 0;
    border-top: 1px solid var(--caw-ap-border);
    border-bottom: 1px solid var(--caw-ap-border);
}
.custom-modal-products > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 9px 0;
}
.custom-modal-products strong {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 10px;
}
.custom-modal-products small {
    display: block;
    margin-top: 10px;
    color: #777;
    font-size: 6px;
}
.custom-modal-products span {
    font-size: 14px;
    position: relative;
    top: 4px;
}
.custom-modal-totals {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
}
.custom-modal-totals span, .custom-modal-totals strong {
    padding: 7px 0;
    font-size: 14px;
}
.custom-modal-totals span { font-weight: 700; color: #000; }
.custom-modal-totals strong { color: #555; font-weight: 400; }
.custom-modal-totals .total {
    padding-top: 20px;
    border-top: 1px solid var(--caw-ap-border);
    color: #111;
    font-weight: 700;
    margin-top: 14px;
}
.custom-modal-buttons {
    margin-top: 24px;
    border-top: 1px solid var(--caw-ap-border);
    padding-top: 14px;
}
.custom-modal-buttons a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding: 14px 20px;
    font-size: 14px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    border-radius: 50px;
    transition: 0.6s;
}
.custom-modal-buttons a:first-child { background: var(--caw-ap-muted-bg); color: #000 !important; }
.custom-modal-buttons a:first-child:hover { background: var(--caw-ap-accent); color: var(--caw-ap-accent-text) !important; }
.custom-modal-buttons .rate { background: var(--caw-ap-accent); color: var(--caw-ap-accent-text) !important; }
.custom-modal-buttons .rate:hover { background: var(--caw-ap-muted-bg); color: #000 !important; }
.custom-empty {
    padding: 50px;
    border: 0;
    text-align: center;
    font-size: 9px;
}

/* =====================================
   ADDRESSES PAGE
===================================== */
.custom-address-page {
    width: 100%;
    border: 1px solid var(--caw-ap-border);
    background: #fff;
    height: 535px;
}
.custom-address-title {
    padding: 13px 18px;
    background: var(--caw-ap-muted-bg);
    font-size: 14px;
    font-weight: 700;
    color: #000;
    font-family: var(--caw-ap-font);
}
.custom-address-content { padding: 20px 18px; }
.custom-address-card {
    width: 625px;
    max-width: 100%;
    background: #f4f4f4;
    padding: 15px;
    box-sizing: border-box;
}
.address-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--caw-ap-border);
}
.address-card-header strong { font-size: 16px; font-weight: 700; font-family: var(--caw-ap-font); }
.address-card-header a {
    color: var(--caw-ap-muted-text) !important;
    font-size: 14px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--caw-ap-font);
    display: flex;
    column-gap: 5px;
}
.address-card-body { display: flex; gap: 20px; padding-top: 18px; }
.address-map {
    width: 75px;
    height: 75px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #8080805c;
    background: linear-gradient(45deg, transparent 46%, var(--caw-ap-border) 47%, var(--caw-ap-border) 52%, transparent 53%), #fafafa;
}
.address-map span {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #777;
    border-radius: 50%;
    color: #ff4d3d;
    font-size: 30px;
}
.address-details strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--caw-ap-muted-text) !important;
    font-family: var(--caw-ap-font);
}
.address-details p {
    display: block !important;
    margin: 0;
    font-size: 14px;
    line-height: 18px;
    color: var(--caw-ap-muted-text);
    text-transform: uppercase;
}
.add-address-button {
    width: 625px;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 23px;
    padding: 14px 21px;
    box-sizing: border-box;
    background: var(--caw-ap-muted-bg);
    color: #000 !important;
    border-radius: 50px;
    font-size: 14px;
    text-decoration: none !important;
    font-weight: 500;
    font-family: var(--caw-ap-font);
}
.add-address-button strong { font-size: 13px; font-weight: 400; }

/*
   Also styles the WooCommerce native billing/shipping edit forms (rendered by
   woocommerce_edit_address() — see CAW_Account_Page::addresses()), so /edit-address/billing/
   matches the same look as everything else instead of falling back to bare WooCommerce markup.
*/
.woocommerce-address-fields .form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    font-family: var(--caw-ap-font);
}
.woocommerce-address-fields .form-row .required { color: #c0392b; text-decoration: none; }
.woocommerce-address-fields input.input-text,
.woocommerce-address-fields select,
.woocommerce-address-fields textarea {
    width: 100%;
    padding: 15px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--caw-ap-muted-bg);
    font-size: 14px;
    font-family: inherit;
    color: #111;
    box-sizing: border-box;
}
.woocommerce-address-fields input.input-text:focus,
.woocommerce-address-fields select:focus,
.woocommerce-address-fields textarea:focus {
    outline: 2px solid #111;
    outline-offset: 1px;
}
.woocommerce-address-fields .button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    border: 0;
    border-radius: 50px;
    background: var(--caw-ap-accent) !important;
    color: var(--caw-ap-accent-text) !important;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    cursor: pointer;
}
.woocommerce-address-fields .button:hover { opacity: .85; }

/* =====================================
   ACCOUNT SETTINGS  (new)
===================================== */
.custom-settings-page {
    width: 100%;
    border: 1px solid var(--caw-ap-border);
    background: #fff;
}
.custom-settings-content {
    padding: 25px 18px 30px;
    max-width: 480px;
}
.custom-settings-field { margin-bottom: 20px; }
.custom-settings-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    font-family: var(--caw-ap-font);
}
.custom-settings-field input {
    width: 100%;
    padding: 15px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--caw-ap-muted-bg);
    font-size: 14px;
    font-family: inherit;
    color: #111;
    box-sizing: border-box;
}
.custom-settings-field input:focus { outline: 2px solid #111; outline-offset: 1px; }
.custom-settings-field--password { position: relative; }
.custom-settings-field--password input { padding-right: 52px; }
.custom-settings-toggle-password {
    position: absolute;
    right: 8px;
    top: 38px;
    width: 34px;
    height: 34px;
    border: 0;
    background: none;
    color: #999;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.custom-settings-toggle-password svg { width: 18px; height: 18px; }
.custom-settings-toggle-password.is-visible { color: #111; }

.custom-settings-password-box {
    border: 1px solid var(--caw-ap-border);
    border-radius: 6px;
    margin: 8px 0 26px;
    overflow: hidden;
}
.custom-settings-password-box__title {
    padding: 13px 18px;
    background: var(--caw-ap-muted-bg);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    font-family: var(--caw-ap-font);
}
.custom-settings-password-box__body { padding: 22px 18px 4px; }
.custom-settings-password-box__body .custom-settings-field:last-child { margin-bottom: 18px; }

.custom-settings-save {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    border: 0;
    border-radius: 50px;
    background: var(--caw-ap-accent);
    color: var(--caw-ap-accent-text);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    cursor: pointer;
    font-family: var(--caw-ap-font);
}
.custom-settings-save:hover { opacity: .85; }

/* WooCommerce's own error/success notices, printed via wc_print_notices() above the form. */
.custom-settings-content .woocommerce-error,
.custom-settings-content .woocommerce-message {
    list-style: none;
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
}
.custom-settings-content .woocommerce-error { background: #fdeceb; color: #c0392b; }
.custom-settings-content .woocommerce-message { background: #eaf7ef; color: #1F6F4F; }
.custom-settings-content .woocommerce-error li,
.custom-settings-content .woocommerce-message li { margin: 0; }

@media (max-width: 900px) {
    .caw-account-page-wrap .woocommerce { flex-direction: column; }
    .custom-account-sidebar { width: 100%; flex: none; }
    .custom-orders-head { display: none; }
    .custom-order-row { grid-template-columns: 1fr 1fr; row-gap: 6px; }
    .custom-modal-box { width: 92vw; height: auto; max-height: 90vh; }
    .custom-address-card, .add-address-button { width: 100%; }
}
