/* ==========================================================
   Chikitsa Sahayak — deep restyle for default WooCommerce
   My Account screens: Orders, Downloads, Addresses, Account
   details. Enqueue this on account pages, after WooCommerce's
   own stylesheet, e.g.:

   add_action( 'wp_enqueue_scripts', function () {
       if ( function_exists( 'is_account_page' ) && is_account_page() ) {
           wp_enqueue_style(
               'cx-account-woocommerce',
               get_stylesheet_directory_uri() . '/cx-account-woocommerce.css',
               array(),
               '1.0.0'
           );
       }
   } );

   No PHP templates were overridden — this is CSS-only, so it
   can't break WooCommerce's order/address/download logic.
   ========================================================== */

:root{
  --cxa-brand:#2563eb;--cxa-brand-dark:#1d4ed8;--cxa-brand-soft:#eef4ff;
  --cxa-ink:#0f172a;--cxa-ink-2:#334155;--cxa-muted:#64748b;--cxa-line:#e6ecf5;
  --cxa-success:#0f9d6e;--cxa-success-soft:#eef7f4;
  --cxa-danger:#e0332c;--cxa-danger-soft:#fde8e7;
  --cxa-warn:#b45309;--cxa-warn-soft:#fef3c7;
  --cxa-radius:14px;
}
.woocommerce-account{font-family:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;color:var(--cxa-ink);}

/* Page title */
.woocommerce-account .entry-title,.woocommerce-account h1.entry-title{font-family:inherit;font-weight:800;font-size:26px;}

/* ---- Orders table ---- */
.woocommerce-account table.woocommerce-orders-table{border:1px solid var(--cxa-line);border-radius:var(--cxa-radius);overflow:hidden;border-collapse:separate;border-spacing:0;width:100%;}
.woocommerce-account table.woocommerce-orders-table thead th{background:#f8fafc;color:var(--cxa-ink-2);font-size:12px;text-transform:uppercase;letter-spacing:.03em;font-weight:700;padding:14px 16px;border-bottom:1px solid var(--cxa-line);}
.woocommerce-account table.woocommerce-orders-table tbody td{padding:14px 16px;font-size:13.5px;border-bottom:1px solid var(--cxa-line);}
.woocommerce-account table.woocommerce-orders-table tbody tr:last-child td{border-bottom:none;}
.woocommerce-account table.woocommerce-orders-table tbody tr:hover{background:#fafbfe;}

/* Order status pill */
.woocommerce-account .woocommerce-orders-table__cell-order-status{font-weight:700;}
.woocommerce-account mark.order-status{background:var(--cxa-brand-soft);color:var(--cxa-brand-dark);border-radius:999px;padding:5px 12px;font-size:11.5px;font-weight:700;display:inline-block;text-transform:capitalize;}
.woocommerce-account mark.order-status.status-completed,
.woocommerce-account mark.order-status.status-delivered{background:var(--cxa-success-soft);color:var(--cxa-success);}
.woocommerce-account mark.order-status.status-cancelled,
.woocommerce-account mark.order-status.status-rejected,
.woocommerce-account mark.order-status.status-failed{background:var(--cxa-danger-soft);color:var(--cxa-danger);}
.woocommerce-account mark.order-status.status-pending,
.woocommerce-account mark.order-status.status-incoming,
.woocommerce-account mark.order-status.status-received,
.woocommerce-account mark.order-status.status-on-hold{background:var(--cxa-warn-soft);color:var(--cxa-warn);}

/* Order action buttons (View, Pay, Cancel, Order Again) */
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button{
  display:inline-flex;align-items:center;justify-content:center;
  padding:8px 16px;border-radius:999px;font-size:12.5px;font-weight:700;
  background:#fff;border:1px solid var(--cxa-line);color:var(--cxa-ink);
  margin:2px;transition:all .15s;
}
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button:hover{border-color:var(--cxa-brand);color:var(--cxa-brand);background:var(--cxa-brand-soft);}
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button.pay,
.woocommerce-account .woocommerce-orders-table__cell-order-actions .view{background:var(--cxa-brand);color:#fff;border-color:var(--cxa-brand);}
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button.pay:hover,
.woocommerce-account .woocommerce-orders-table__cell-order-actions .view:hover{background:var(--cxa-brand-dark);color:#fff;}
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button.cancel{color:var(--cxa-danger);border-color:var(--cxa-danger-soft);}

/* Single order view */
.woocommerce-account .woocommerce-order-details,
.woocommerce-account .woocommerce-customer-details{border:1px solid var(--cxa-line);border-radius:var(--cxa-radius);padding:20px;margin-bottom:20px;background:#fff;}
.woocommerce-account .woocommerce-order-details table,
.woocommerce-account table.shop_table{border-collapse:collapse;width:100%;}
.woocommerce-account table.shop_table th{background:#f8fafc;padding:12px;font-size:12px;text-transform:uppercase;color:var(--cxa-ink-2);font-weight:700;border-bottom:1px solid var(--cxa-line);}
.woocommerce-account table.shop_table td{padding:12px;font-size:13.5px;border-bottom:1px solid var(--cxa-line);}
.woocommerce-account table.shop_table tfoot th,
.woocommerce-account table.shop_table tfoot td{font-weight:700;}

/* Pagination */
.woocommerce-account .woocommerce-pagination .woocommerce-button{
  display:inline-flex;align-items:center;padding:8px 16px;border-radius:999px;
  border:1px solid var(--cxa-line);font-size:13px;font-weight:600;color:var(--cxa-ink-2);
}
.woocommerce-account .woocommerce-pagination .woocommerce-button:hover{border-color:var(--cxa-brand);color:var(--cxa-brand);}

/* ---- Downloads ---- */
.woocommerce-account table.woocommerce-MyAccount-downloads{border:1px solid var(--cxa-line);border-radius:var(--cxa-radius);overflow:hidden;border-collapse:separate;border-spacing:0;width:100%;}
.woocommerce-account table.woocommerce-MyAccount-downloads th{background:#f8fafc;padding:12px 16px;font-size:12px;text-transform:uppercase;color:var(--cxa-ink-2);font-weight:700;}
.woocommerce-account table.woocommerce-MyAccount-downloads td{padding:12px 16px;font-size:13.5px;border-bottom:1px solid var(--cxa-line);}
.woocommerce-account table.woocommerce-MyAccount-downloads .woocommerce-MyAccount-downloads-file a{
  color:var(--cxa-brand);font-weight:700;display:inline-flex;align-items:center;gap:6px;
}

/* ---- Addresses ---- */
.woocommerce-account .woocommerce-Addresses{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;}
.woocommerce-account .woocommerce-Address{border:1px solid var(--cxa-line);border-radius:var(--cxa-radius);padding:18px;background:#fff;}
.woocommerce-account .woocommerce-Address-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;}
.woocommerce-account .woocommerce-Address-title h3{font-size:15px;font-weight:700;margin:0;}
.woocommerce-account .woocommerce-Address-title .edit{
  font-size:12px;font-weight:700;color:var(--cxa-brand);border:1px solid var(--cxa-brand-soft);
  padding:5px 12px;border-radius:999px;background:var(--cxa-brand-soft);
}
.woocommerce-account .woocommerce-Address address{font-size:13.5px;color:var(--cxa-ink-2);line-height:1.6;font-style:normal;}
@media (max-width:720px){.woocommerce-account .woocommerce-Addresses{grid-template-columns:1fr;}}

/* ---- Account details form ---- */
.woocommerce-account .woocommerce-EditAccountForm .form-row{margin-bottom:16px;}
.woocommerce-account .woocommerce-EditAccountForm label{display:block;font-size:13px;font-weight:700;color:var(--cxa-ink-2);margin-bottom:6px;}
.woocommerce-account .woocommerce-EditAccountForm input[type="text"],
.woocommerce-account .woocommerce-EditAccountForm input[type="email"],
.woocommerce-account .woocommerce-EditAccountForm input[type="password"]{
  width:100%;padding:11px 14px;border:1.5px solid var(--cxa-line);border-radius:10px;
  font-family:inherit;font-size:14px;transition:border-color .15s;
}
.woocommerce-account .woocommerce-EditAccountForm input:focus{outline:none;border-color:var(--cxa-brand);}
.woocommerce-account .woocommerce-EditAccountForm fieldset{border:1px dashed var(--cxa-line);border-radius:var(--cxa-radius);padding:16px;margin-top:8px;}
.woocommerce-account .woocommerce-EditAccountForm legend{font-size:13px;font-weight:700;color:var(--cxa-ink-2);padding:0 8px;}

/* ---- Address edit form (same field styling) ---- */
.woocommerce-account form.woocommerce-address-fields .form-row{margin-bottom:16px;}
.woocommerce-account form.woocommerce-address-fields label{display:block;font-size:13px;font-weight:700;color:var(--cxa-ink-2);margin-bottom:6px;}
.woocommerce-account form.woocommerce-address-fields input,
.woocommerce-account form.woocommerce-address-fields select{
  width:100%;padding:11px 14px;border:1.5px solid var(--cxa-line);border-radius:10px;
  font-family:inherit;font-size:14px;background:#fff;
}
.woocommerce-account form.woocommerce-address-fields input:focus,
.woocommerce-account form.woocommerce-address-fields select:focus{outline:none;border-color:var(--cxa-brand);}

/* ---- Notices (login errors, "address saved", etc.) ---- */
.woocommerce-account .woocommerce-message{
  background:var(--cxa-success-soft);color:#0b6b4f;border:1px solid #cdeedd;
  border-radius:12px;padding:14px 18px;font-size:13.5px;font-weight:600;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.woocommerce-account .woocommerce-error{
  background:var(--cxa-danger-soft);color:#9c231e;border:1px solid #f6c9c7;
  border-radius:12px;padding:14px 18px;font-size:13.5px;font-weight:600;list-style:none;margin:0;
}
.woocommerce-account .woocommerce-error li{list-style:none;}
.woocommerce-account .woocommerce-message .button,
.woocommerce-account .woocommerce-error .button{
  background:var(--cxa-brand);color:#fff;border-radius:999px;padding:8px 16px;font-weight:700;font-size:12.5px;
}

/* Empty state ("No order has been made yet.") */
.woocommerce-account .woocommerce-notice--no-content,
.woocommerce-account .woocommerce-MyAccount-content > p:only-child{
  background:#f8fafc;border:1px dashed var(--cxa-line);border-radius:var(--cxa-radius);
  padding:32px;text-align:center;color:var(--cxa-muted);font-size:14px;
}

@media (max-width:720px){
  .woocommerce-account table.woocommerce-orders-table thead{display:none;}
  .woocommerce-account table.woocommerce-orders-table,
  .woocommerce-account table.woocommerce-orders-table tbody,
  .woocommerce-account table.woocommerce-orders-table tr,
  .woocommerce-account table.woocommerce-orders-table td{display:block;width:100%;}
  .woocommerce-account table.woocommerce-orders-table tr{border-bottom:1px solid var(--cxa-line);padding:12px 0;}
  .woocommerce-account table.woocommerce-orders-table td{border:none;padding:4px 16px;}
  .woocommerce-account table.woocommerce-orders-table td::before{content:attr(data-title) ": ";font-weight:700;color:var(--cxa-ink-2);}
}
