/* ============================================
   SHARK MY ACCOUNT — Noir Theme
   Matches cart/checkout design system
   ============================================ */

/* --- Layout --- */
#ao-my-account-area {
  max-width: var(--sb-container-width, 1320px);
  margin: 40px auto;
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* --- Navigation Sidebar Wrapper (avatar + nav) --- */
.account-navigation-wrap {
  flex: 0 0 300px;
  width: 300px;
  background: var(--sb-bg, #fff);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 30px;
  padding: 25px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 100px;
  order: 1;
  align-self: flex-start;
  box-sizing: border-box;
}

.ao-account-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ao-account-nav ul li {
  margin-bottom: 8px;
  display: block;
}

/* --- Override base theme nav link styles + noir enhancement --- */
#ao-my-account-area .account-navigation-wrap li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 12px;
  color: var(--sb-text-muted, #86868b);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: var(--sb-transition, all 0.4s cubic-bezier(0.16, 1, 0.3, 1));
  font-family: var(--sb-font-body, "Inter", sans-serif);
  white-space: nowrap;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top: 0;
}

#ao-my-account-area .account-navigation-wrap li a:visited {
  color: var(--sb-text-muted, #86868b);
}

#ao-my-account-area .account-navigation-wrap li.is-active a,
#ao-my-account-area .account-navigation-wrap li.is-active a:hover,
#ao-my-account-area .account-navigation-wrap li a:hover {
  background: var(--sb-primary, #000);
  color: var(--sb-bg, #fff);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top: 0;
}

.ao-account-nav .nav-icon {
  margin-right: 12px;
  display: flex;
  align-items: center;
}

/* --- Avatar (from base theme hooks) --- */
.account-navigation-wrap .base-account-avatar {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sb-border, #e5e5e5);
}

.account-navigation-wrap .base-account-avatar .base-customer-image {
  margin-bottom: 10px;
}

.account-navigation-wrap .base-account-avatar .base-customer-image img {
  object-fit: cover;
}

.account-navigation-wrap .base-account-avatar .base-customer-name {
  font-family: var(--sb-font-heading, "Inter", sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--sb-primary, #000);
}

/* --- Content Area --- */
.woocommerce-MyAccount-content {
  flex: 1;
  order: 2;
  background: var(--sb-bg, #fff);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 30px;
  padding: 50px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
  min-height: 500px;
}

.woocommerce-MyAccount-content h2 {
  font-family: var(--sb-font-heading, "Inter", sans-serif);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--sb-primary, #000);
  letter-spacing: -0.03em;
}

.woocommerce-MyAccount-content h3 {
  font-family: var(--sb-font-heading, "Inter", sans-serif);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--sb-primary, #000);
}

/* --- Links in Content Area --- */
.woocommerce-MyAccount-content a {
  color: var(--sb-primary, #000);
}

/* --- Forms & Inputs --- */
.woocommerce-MyAccount-content form > p {
  margin-bottom: 20px;
}

.woocommerce-MyAccount-content label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  color: var(--sb-primary, #000);
}

.woocommerce-MyAccount-content input.input-text,
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea {
  width: 100%;
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1.5px solid var(--sb-border, #e5e5e5);
  border-radius: 15px;
  padding: 15px 20px;
  font-size: 15px;
  font-family: var(--sb-font-body, "Inter", sans-serif);
  transition: var(--sb-transition, all 0.4s cubic-bezier(0.16, 1, 0.3, 1));
  box-shadow: none;
  color: var(--sb-text, #1d1d1f);
}

.woocommerce-MyAccount-content input.input-text:focus,
.woocommerce-MyAccount-content select:focus,
.woocommerce-MyAccount-content textarea:focus {
  background: var(--sb-bg, #fff);
  border-color: var(--sb-primary, #000);
  outline: none;
}

/* --- Buttons --- */
.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content button[type="submit"]:not(.ao-auth-btn) {
  background: var(--sb-primary, #000);
  color: var(--sb-bg, #fff);
  border-radius: 50px;
  padding: 18px 35px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 13px;
  border: none;
  transition: var(--sb-transition, all 0.4s cubic-bezier(0.16, 1, 0.3, 1));
  cursor: pointer;
  display: inline-block;
  font-family: var(--sb-font-body, "Inter", sans-serif);
  text-decoration: none;
  line-height: 1.2;
}

.woocommerce-MyAccount-content .button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  background: #222;
  color: var(--sb-bg, #fff);
}

/* --- lb-btn animation for account buttons --- */
.woocommerce-MyAccount-content button[data-lb-btn],
.woocommerce-MyAccount-content a[data-lb-btn] {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.woocommerce-MyAccount-content button[data-lb-btn] .btn-fill,
.woocommerce-MyAccount-content a[data-lb-btn] .btn-fill {
  display: block;
  position: absolute;
  border-radius: 50%;
  width: 150%;
  height: 200%;
  top: -50%;
  left: -25%;
  background: rgb(var(--color-btn, 0, 0, 0));
  pointer-events: none;
  z-index: 0;
}

.woocommerce-MyAccount-content button[data-lb-btn] .btn-text,
.woocommerce-MyAccount-content a[data-lb-btn] .btn-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Tables (Orders) --- */
.woocommerce-MyAccount-orders,
.woocommerce-table--order-details {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 15px;
  margin: 0;
}

.woocommerce-MyAccount-orders thead th {
  border: none;
  padding: 0 20px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-orders tbody tr td,
.woocommerce-MyAccount-orders tbody tr th {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-width: 1px 0;
  padding: 20px;
  font-size: 14px;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-orders tbody tr td:first-child,
.woocommerce-MyAccount-orders tbody tr th:first-child {
  border-left: 1px solid var(--sb-border, #e5e5e5);
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.woocommerce-MyAccount-orders tbody tr td:last-child,
.woocommerce-MyAccount-orders tbody tr th:last-child {
  border-right: 1px solid var(--sb-border, #e5e5e5);
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.woocommerce-MyAccount-orders tbody tr td .button {
  font-size: 12px;
  padding: 10px 22px;
  white-space: nowrap;
}

/* --- Pagination --- */
.woocommerce-pagination {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.woocommerce-pagination .button {
  font-size: 12px;
  padding: 12px 24px;
}

/* --- Addresses --- */
.woocommerce-Address {
  margin-bottom: 30px;
}

.woocommerce-Addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.woocommerce-Address-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

.woocommerce-Address-title h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.woocommerce-Address-title .edit {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-primary, #000);
  text-decoration: none;
  white-space: nowrap;
}

.woocommerce-Address-title .edit:hover {
  text-decoration: underline;
}

.woocommerce-Address address {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 20px;
  padding: 25px;
  font-style: normal;
  line-height: 1.8;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.edit-link {
  font-weight: 800;
  text-decoration: none;
  color: var(--sb-primary, #000);
  display: inline-block;
  margin-top: 15px;
  font-family: var(--sb-font-body, "Inter", sans-serif);
  font-size: 14px;
}

.edit-link:hover {
  text-decoration: underline;
}

/* --- Fieldset / Legend --- */
fieldset {
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 20px;
  padding: 30px;
  margin-top: 30px;
}

legend {
  font-weight: 800;
  padding: 0 15px;
  font-family: var(--sb-font-heading, "Inter", sans-serif);
  font-size: 16px;
  color: var(--sb-primary, #000);
}

/* --- Dashboard Cards --- */
.ao-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.ao-dashboard-card {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  transition: var(--sb-transition, all 0.4s cubic-bezier(0.16, 1, 0.3, 1));
  text-decoration: none;
  color: var(--sb-primary, #000);
  display: block;
}

.ao-dashboard-card:hover {
  transform: translateY(-5px);
  border-color: var(--sb-primary, #000);
}

.ao-dashboard-card .card-icon {
  width: 50px;
  height: 50px;
  background: var(--sb-bg, #fff);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  color: var(--sb-primary, #000);
}

.ao-dashboard-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 5px;
  font-family: var(--sb-font-heading, "Inter", sans-serif);
  color: var(--sb-primary, #000);
}

.ao-dashboard-card p {
  font-size: 13px;
  color: var(--sb-text-muted, #86868b);
  line-height: 1.4;
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

/* --- Password Strength Indicator --- */
.woocommerce-password-strength {
  margin-top: 10px;
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-password-strength.short {
  background: #fff0f0;
  border: 1px solid #ffcccc;
  color: #cc0000;
}

.woocommerce-password-strength.bad {
  background: #fff5e6;
  border: 1px solid #ffd699;
  color: #cc7a00;
}

.woocommerce-password-strength.good {
  background: #f0f7ff;
  border: 1px solid #b3d4ff;
  color: #0066cc;
}

.woocommerce-password-strength.strong {
  background: #f0fff0;
  border: 1px solid #b3ffb3;
  color: #008000;
}

.woocommerce-password-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

/* --- Order Status Badge Colors --- */
.woocommerce-orders-table__cell-order-status {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.woocommerce-orders-table__cell-order-status[data-title*="Completed"],
.woocommerce-orders-table__cell-order-status[data-title*="completed"] {
  color: #00a84f;
}

.woocommerce-orders-table__cell-order-status[data-title*="Processing"],
.woocommerce-orders-table__cell-order-status[data-title*="processing"] {
  color: #0073d4;
}

.woocommerce-orders-table__cell-order-status[data-title*="Pending"],
.woocommerce-orders-table__cell-order-status[data-title*="pending"] {
  color: #b8860b;
}

.woocommerce-orders-table__cell-order-status[data-title*="Cancelled"],
.woocommerce-orders-table__cell-order-status[data-title*="cancelled"],
.woocommerce-orders-table__cell-order-status[data-title*="Refunded"],
.woocommerce-orders-table__cell-order-status[data-title*="refunded"] {
  color: #cc0000;
}

.woocommerce-orders-table__cell-order-status[data-title*="On hold"],
.woocommerce-orders-table__cell-order-status[data-title*="on-hold"],
.woocommerce-orders-table__cell-order-status[data-title*="Failed"],
.woocommerce-orders-table__cell-order-status[data-title*="failed"] {
  color: #cc7a00;
}

/* --- Order Number, Date, Total Cells --- */
.woocommerce-orders-table__cell-order-number a {
  font-weight: 700;
  color: var(--sb-primary, #000);
  text-decoration: none;
}

.woocommerce-orders-table__cell-order-number a:hover {
  text-decoration: underline;
}

.woocommerce-orders-table__cell-order-date time {
  color: var(--sb-text-muted, #86868b);
}

.woocommerce-orders-table__cell-order-total {
  font-weight: 600;
  color: var(--sb-primary, #000);
}

/* --- Order Actions Cell --- */
.woocommerce-orders-table__cell-order-actions .button {
  font-size: 12px;
  padding: 10px 22px;
  white-space: nowrap;
}

/* --- My Account Notices --- */
.woocommerce-MyAccount-content
  .woocommerce-notices-wrapper
  .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-notices-wrapper .woocommerce-error {
  background: var(--sb-bg, #fff);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 20px;
  padding: 20px 25px;
  margin-bottom: 30px;
  list-style: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  font-size: 14px;
  color: var(--sb-text, #1d1d1f);
  display: flex;
  align-items: center;
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-content
  .woocommerce-notices-wrapper
  .woocommerce-message {
  border-left: 5px solid #00c851;
}

.woocommerce-MyAccount-content .woocommerce-notices-wrapper .woocommerce-error {
  border-left: 5px solid #ff4d4d;
}

.woocommerce-MyAccount-content .woocommerce-notices-wrapper .woocommerce-info {
  border-left: 5px solid #33b5e5;
}

/* --- Notices outside .woocommerce-notices-wrapper (e.g. "No orders") --- */
.woocommerce-MyAccount-content > .woocommerce-info,
.woocommerce-MyAccount-content > .woocommerce-message,
.woocommerce-MyAccount-content > .woocommerce-error {
  background: var(--sb-bg, #fff);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 20px;
  padding: 20px 25px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  font-size: 14px;
  color: var(--sb-text, #1d1d1f);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-content > .woocommerce-message {
  border-left: 5px solid #00c851;
}

.woocommerce-MyAccount-content > .woocommerce-error {
  border-left: 5px solid #ff4d4d;
}

.woocommerce-MyAccount-content > .woocommerce-info {
  border-left: 5px solid #000;
}

/* Browse products / action link inside empty-state notices */
.woocommerce-MyAccount-content > .woocommerce-info .woocommerce-Button,
.woocommerce-MyAccount-content > .woocommerce-message .woocommerce-Button {
  display: inline-block;
  background: var(--sb-primary, #000);
  color: var(--sb-bg, #fff);
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  margin-left: 10px;
  vertical-align: middle;
  transition: var(--sb-transition, all 0.4s cubic-bezier(0.16, 1, 0.3, 1));
  line-height: 1.2;
}

.woocommerce-MyAccount-content > .woocommerce-info .woocommerce-Button:hover,
.woocommerce-MyAccount-content
  > .woocommerce-message
  .woocommerce-Button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* --- View Order / Order Details --- */
.woocommerce-MyAccount-content .order-number,
.woocommerce-MyAccount-content .order-date,
.woocommerce-MyAccount-content .order-status {
  font-weight: 700;
  color: var(--sb-primary, #000);
}

.woocommerce-MyAccount-content mark.order-status {
  background: var(--sb-bg-soft, #f5f5f7);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- View Order: Order Details Table --- */
.woocommerce-MyAccount-content .woocommerce-order-details {
  margin-top: 30px;
}

.woocommerce-MyAccount-content .woocommerce-order-details h2 {
  font-size: 22px;
}

.woocommerce-table--order-details tbody tr td,
.woocommerce-table--order-details tbody tr th {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-width: 1px 0;
  padding: 20px;
  font-size: 14px;
  color: var(--sb-text, #1d1d1f);
  font-family: var(--sb-font-body, "Inter", sans-serif);
  vertical-align: top;
}

.woocommerce-table--order-details tbody tr td:first-child,
.woocommerce-table--order-details tbody tr th:first-child {
  border-left: 1px solid var(--sb-border, #e5e5e5);
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.woocommerce-table--order-details tbody tr td:last-child,
.woocommerce-table--order-details tbody tr th:last-child {
  border-right: 1px solid var(--sb-border, #e5e5e5);
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.woocommerce-table--order-details tfoot tr th {
  text-align: left;
  padding: 15px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
  background: transparent;
  border: none;
}

.woocommerce-table--order-details tfoot tr td {
  text-align: right;
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sb-primary, #000);
  font-family: var(--sb-font-body, "Inter", sans-serif);
  background: transparent;
  border: none;
}

.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td {
  font-size: 16px;
  font-weight: 800;
}

.woocommerce-table--order-details .product-name a {
  color: var(--sb-primary, #000);
  text-decoration: none;
  font-weight: 600;
}

.woocommerce-table--order-details .product-name a:hover {
  text-decoration: underline;
}

.woocommerce-table--order-details .product-total {
  text-align: right;
  font-weight: 600;
  color: var(--sb-primary, #000);
}

.woocommerce-table--order-details tbody .wc-item-meta {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 12px;
  color: var(--sb-text-muted, #86868b);
}

.woocommerce-table--order-details tbody .wc-item-meta li {
  margin-bottom: 4px;
}

/* --- View Order: Customer Details --- */
.woocommerce-customer-details {
  margin-top: 30px;
}

.woocommerce-customer-details .woocommerce-columns--addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.woocommerce-customer-details address {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 20px;
  padding: 25px;
  font-style: normal;
  line-height: 1.8;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-customer-details address p {
  margin: 5px 0;
}

.woocommerce-customer-details .woocommerce-column__title {
  font-size: 18px;
  margin-bottom: 15px;
}

/* --- View Order: Order Updates / Notes --- */
.woocommerce-OrderUpdates {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}

.woocommerce-OrderUpdates .woocommerce-OrderUpdate {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 16px;
  padding: 20px 25px;
  margin-bottom: 15px;
}

.woocommerce-OrderUpdate-meta {
  font-size: 12px;
  color: var(--sb-text-muted, #86868b);
  margin-bottom: 8px;
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-OrderUpdate-description p {
  font-size: 14px;
  color: var(--sb-text, #1d1d1f);
  line-height: 1.6;
  margin: 0;
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

/* --- Payment Methods --- */
.woocommerce-MyAccount-paymentMethods {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 15px;
  margin: 0 0 25px;
}

.woocommerce-MyAccount-paymentMethods thead th {
  border: none;
  padding: 0 20px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-paymentMethods tbody tr td,
.woocommerce-MyAccount-paymentMethods tbody tr th {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-width: 1px 0;
  padding: 20px;
  font-size: 14px;
  color: var(--sb-text, #1d1d1f);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-paymentMethods tbody tr td:first-child,
.woocommerce-MyAccount-paymentMethods tbody tr th:first-child {
  border-left: 1px solid var(--sb-border, #e5e5e5);
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.woocommerce-MyAccount-paymentMethods tbody tr td:last-child,
.woocommerce-MyAccount-paymentMethods tbody tr th:last-child {
  border-right: 1px solid var(--sb-border, #e5e5e5);
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.woocommerce-MyAccount-paymentMethods .button {
  font-size: 12px;
  padding: 8px 18px;
}

/* --- "No orders" / "No saved methods" notice links --- */
.woocommerce-MyAccount-content .woocommerce-Button {
  display: inline-block;
  margin-top: 10px;
}

/* --- Add Payment Method form --- */
#add_payment_method .woocommerce-PaymentMethods {
  list-style: none;
  margin: 0 0 25px;
  padding: 0;
}

#add_payment_method .woocommerce-PaymentMethod {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-radius: 16px;
  padding: 20px 25px;
  margin-bottom: 15px;
}

#add_payment_method .woocommerce-PaymentMethod label {
  display: inline;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  cursor: pointer;
}

#add_payment_method .woocommerce-PaymentMethod .input-radio {
  margin-right: 10px;
}

#add_payment_method .woocommerce-PaymentBox {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--sb-border, #e5e5e5);
}

#add_payment_method .form-row {
  margin-top: 20px;
}

/* --- Downloads (hidden from nav but may be accessed directly) --- */
.woocommerce-MyAccount-downloads {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 15px;
  margin: 0;
}

.woocommerce-MyAccount-downloads thead th {
  border: none;
  padding: 0 20px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-text-muted, #86868b);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-downloads tbody tr td {
  background: var(--sb-bg-soft, #f5f5f7);
  border: 1px solid var(--sb-border, #e5e5e5);
  border-width: 1px 0;
  padding: 20px;
  font-size: 14px;
  color: var(--sb-text, #1d1d1f);
  font-family: var(--sb-font-body, "Inter", sans-serif);
}

.woocommerce-MyAccount-downloads tbody tr td:first-child {
  border-left: 1px solid var(--sb-border, #e5e5e5);
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.woocommerce-MyAccount-downloads tbody tr td:last-child {
  border-right: 1px solid var(--sb-border, #e5e5e5);
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.woocommerce-MyAccount-downloads .button {
  font-size: 12px;
  padding: 8px 18px;
}

/* --- Responsive: Tablet --- */
@media (max-width: 991px) {
  #ao-my-account-area {
    flex-direction: column;
    margin: 0 auto;
    gap: 0;
    padding: 0;
  }

  .account-navigation-wrap {
    width: 100%;
    max-width: 100vw;
    flex: none;
    position: static;
    margin-bottom: 0;
    padding: 10px 15px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-sizing: border-box;
    box-shadow: none;
  }

  .ao-account-nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    list-style: none;
  }

  .ao-account-nav ul::-webkit-scrollbar {
    display: none;
  }

  .ao-account-nav ul li {
    margin: 0;
    flex: 0 0 auto;
    display: block;
  }

  #ao-my-account-area .account-navigation-wrap li a {
    padding: 10px 18px;
    font-size: 13px;
    white-space: nowrap;
  }

  .woocommerce-MyAccount-content {
    padding: 30px 20px;
    border-radius: 20px;
    min-height: auto;
    border-left: none;
    border-right: none;
  }

  /* Dashboard Cards Mobile */
  .ao-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .ao-dashboard-card {
    padding: 25px;
    display: flex;
    align-items: center;
    text-align: left;
  }

  .ao-dashboard-card .card-icon {
    margin: 0 15px 0 0;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
  }

  .ao-dashboard-card .ao-card-text {
    display: flex;
    flex-direction: column;
  }

  .ao-dashboard-card h3 {
    margin-bottom: 2px;
    font-size: 15px;
  }

  .ao-dashboard-card p {
    font-size: 12px;
  }

  /* Tables Mobile */
  .woocommerce-MyAccount-orders,
  .woocommerce-table--order-details,
  .woocommerce-MyAccount-paymentMethods,
  .woocommerce-MyAccount-downloads {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  /* Address grids stack on mobile */
  .woocommerce-Addresses,
  .woocommerce-customer-details .woocommerce-columns--addresses {
    grid-template-columns: 1fr;
  }

  /* Avatar hide on mobile */
  .account-navigation-wrap .base-account-avatar {
    display: none;
  }
}

/* --- Responsive: Small --- */
@media (max-width: 480px) {
  .woocommerce-MyAccount-content h2 {
    font-size: 22px;
  }

  .woocommerce-MyAccount-content h3 {
    font-size: 20px;
  }

  .woocommerce-MyAccount-content .button,
  .woocommerce-MyAccount-content button[type="submit"]:not(.ao-auth-btn) {
    width: 100%;
    text-align: center;
  }
}

/* --- Responsive: Table Card Layout --- */
@media (max-width: 780px) {
  /* Hide table headers to show card-style rows */
  .woocommerce-MyAccount-orders thead,
  .woocommerce-MyAccount-paymentMethods thead,
  .woocommerce-MyAccount-downloads thead {
    display: none;
  }

  .woocommerce-MyAccount-orders,
  .woocommerce-MyAccount-paymentMethods,
  .woocommerce-MyAccount-downloads {
    border-spacing: 0;
    overflow: visible;
  }

  .woocommerce-MyAccount-orders tbody tr,
  .woocommerce-MyAccount-paymentMethods tbody tr,
  .woocommerce-MyAccount-downloads tbody tr {
    display: block;
    margin-bottom: 15px;
    background: var(--sb-bg-soft, #f5f5f7);
    border: 1px solid var(--sb-border, #e5e5e5);
    border-radius: 16px;
    padding: 15px;
  }

  .woocommerce-MyAccount-orders tbody tr td,
  .woocommerce-MyAccount-orders tbody tr th,
  .woocommerce-MyAccount-paymentMethods tbody tr td,
  .woocommerce-MyAccount-paymentMethods tbody tr th,
  .woocommerce-MyAccount-downloads tbody tr td,
  .woocommerce-MyAccount-downloads tbody tr th {
    display: block;
    padding: 10px 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 13px;
    text-align: left;
    color: var(--sb-text, #1d1d1f);
  }

  .woocommerce-MyAccount-orders tbody tr td::before,
  .woocommerce-MyAccount-orders tbody tr th::before,
  .woocommerce-MyAccount-paymentMethods tbody tr td::before,
  .woocommerce-MyAccount-paymentMethods tbody tr th::before,
  .woocommerce-MyAccount-downloads tbody tr td::before,
  .woocommerce-MyAccount-downloads tbody tr th::before {
    content: attr(data-title) ": ";
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sb-text-muted, #86868b);
    display: inline-block;
    margin-right: 8px;
    width: auto;
  }

  .woocommerce-MyAccount-orders tbody tr td:first-child,
  .woocommerce-MyAccount-orders tbody tr th:first-child,
  .woocommerce-MyAccount-paymentMethods tbody tr td:first-child,
  .woocommerce-MyAccount-paymentMethods tbody tr th:first-child,
  .woocommerce-MyAccount-downloads tbody tr td:first-child,
  .woocommerce-MyAccount-downloads tbody tr th:first-child {
    padding-top: 0;
  }

  .woocommerce-MyAccount-orders tbody tr td:last-child,
  .woocommerce-MyAccount-orders tbody tr th:last-child,
  .woocommerce-MyAccount-paymentMethods tbody tr td:last-child,
  .woocommerce-MyAccount-paymentMethods tbody tr th:last-child,
  .woocommerce-MyAccount-downloads tbody tr td:last-child,
  .woocommerce-MyAccount-downloads tbody tr th:last-child {
    padding-bottom: 0;
  }

  .woocommerce-MyAccount-orders tbody tr td + td,
  .woocommerce-MyAccount-orders tbody tr td + th,
  .woocommerce-MyAccount-orders tbody tr th + td,
  .woocommerce-MyAccount-orders tbody tr th + th,
  .woocommerce-MyAccount-paymentMethods tbody tr td + td,
  .woocommerce-MyAccount-paymentMethods tbody tr td + th,
  .woocommerce-MyAccount-paymentMethods tbody tr th + td,
  .woocommerce-MyAccount-paymentMethods tbody tr th + th,
  .woocommerce-MyAccount-downloads tbody tr td + td,
  .woocommerce-MyAccount-downloads tbody tr td + th,
  .woocommerce-MyAccount-downloads tbody tr th + td,
  .woocommerce-MyAccount-downloads tbody tr th + th {
    border-top: 1px solid var(--sb-border, #e5e5e5);
  }

  /* Notice padding on mobile */
  .woocommerce-MyAccount-content > .woocommerce-info,
  .woocommerce-MyAccount-content > .woocommerce-message,
  .woocommerce-MyAccount-content > .woocommerce-error {
    padding: 16px;
    font-size: 13px;
    text-align: center;
  }

  .woocommerce-MyAccount-content > .woocommerce-info .woocommerce-Button,
  .woocommerce-MyAccount-content > .woocommerce-message .woocommerce-Button {
    display: block;
    margin: 12px 0 0;
    text-align: center;
  }

  /* Order details table card layout */
  .woocommerce-table--order-details tbody tr {
    display: block;
    margin-bottom: 15px;
    background: var(--sb-bg-soft, #f5f5f7);
    border: 1px solid var(--sb-border, #e5e5e5);
    border-radius: 16px;
    padding: 15px;
  }

  .woocommerce-table--order-details tbody tr td,
  .woocommerce-table--order-details tbody tr th {
    display: block;
    padding: 10px 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 13px;
    text-align: left;
  }

  .woocommerce-table--order-details tbody tr td:first-child,
  .woocommerce-table--order-details tbody tr th:first-child {
    padding-top: 0;
  }

  .woocommerce-table--order-details tbody tr td:last-child,
  .woocommerce-table--order-details tbody tr th:last-child {
    padding-bottom: 0;
  }

  .woocommerce-table--order-details tbody tr td + td,
  .woocommerce-table--order-details tbody tr th + td,
  .woocommerce-table--order-details tbody tr td + th,
  .woocommerce-table--order-details tbody tr th + th {
    border-top: 1px solid var(--sb-border, #e5e5e5);
  }

  .woocommerce-table--order-details tbody tr td.product-total,
  .woocommerce-table--order-details tbody tr th.product-total {
    text-align: left;
  }

  .woocommerce-table--order-details tfoot {
    display: block;
  }

  .woocommerce-table--order-details tfoot tr {
    display: block;
  }

  .woocommerce-table--order-details tfoot tr th,
  .woocommerce-table--order-details tfoot tr td {
    display: block;
    padding: 8px 0;
    text-align: left;
    border: none;
    background: none;
  }
}
