/* ------------------------------------------------------------
   WooCommerce My Account — DTB
   White-background theme; card images preserved.
   Scoped to .woocommerce-account only.
   ------------------------------------------------------------ */

/* ── Page base: white background (header renders same as all other pages) ── */
body.woocommerce-account {
  background: #fff !important;
}

/* ── Shared card style ── */
.dtb-ma-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-sizing: border-box;
}
.dtb-ma-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.54);
  pointer-events: none;
  z-index: 0;
}
.dtb-ma-card > * {
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════════════════════════
   DESKTOP LAYOUT  (> 900px)
   ════════════════════════════════════════════════════════ */

/* Outer page wrapper (from page.php) */
body.woocommerce-account .dtb-account-content-container {
  max-width: 950px;
  width: 100%;
  margin: 40px auto 0;
  box-sizing: border-box;
}

/* MyAccount grid: 200px nav + content */
body.woocommerce-account .woocommerce-MyAccount {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 0 0 46px;
  box-sizing: border-box;
}

/* ── Nav card (sidebar) ── */
body.woocommerce-account .woocommerce-MyAccount-navigation {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 18px;
  box-sizing: border-box;
  max-width: 200px;
  width: 100%;
  background-image: url('ma_card1.webp');
  background-size: cover;
  background-position: center;
}
body.woocommerce-account .woocommerce-MyAccount-navigation::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
  pointer-events: none;
  z-index: 0;
}
body.woocommerce-account .woocommerce-MyAccount-navigation > * {
  position: relative;
  z-index: 1;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li {
  margin: 0 0 8px;
}
body.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 11px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,0.08);
  transition: background 0.15s;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
  background: rgba(255,255,255,0.20);
}

/* ── Content card ── */
body.woocommerce-account .woocommerce-MyAccount-content {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 24px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 720px;
  background-image: url('ma_card2.webp');
  background-size: cover;
  background-position: center;
}
body.woocommerce-account .woocommerce-MyAccount-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  pointer-events: none;
  z-index: 0;
}
body.woocommerce-account .woocommerce-MyAccount-content > * {
  position: relative;
  z-index: 1;
}

/* Content text */
body.woocommerce-account .woocommerce-MyAccount-content,
body.woocommerce-account .woocommerce-MyAccount-content p,
body.woocommerce-account .woocommerce-MyAccount-content li,
body.woocommerce-account .woocommerce-MyAccount-content td,
body.woocommerce-account .woocommerce-MyAccount-content th,
body.woocommerce-account .woocommerce-MyAccount-content label,
body.woocommerce-account .woocommerce-MyAccount-content strong,
body.woocommerce-account .woocommerce-MyAccount-content a,
body.woocommerce-account .woocommerce-MyAccount-content h1,
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
  color: rgba(255,255,255,0.90);
}
body.woocommerce-account .woocommerce-MyAccount-content a:hover {
  text-decoration: underline;
}

/* Extended text coverage — catches WooCommerce sub-page elements */
body.woocommerce-account .woocommerce-MyAccount-content span,
body.woocommerce-account .woocommerce-MyAccount-content small,
body.woocommerce-account .woocommerce-MyAccount-content em,
body.woocommerce-account .woocommerce-MyAccount-content address,
body.woocommerce-account .woocommerce-MyAccount-content legend,
body.woocommerce-account .woocommerce-MyAccount-content mark,
body.woocommerce-account .woocommerce-MyAccount-content abbr,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Price-amount,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Price-currencySymbol {
  color: rgba(255,255,255,0.90);
}
body.woocommerce-account .woocommerce-MyAccount-content fieldset {
  border-color: rgba(255,255,255,0.12);
}

/* Order detail: billing/shipping address — left-align, prevent overflow */
body.woocommerce-account .woocommerce-MyAccount-content address,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-column p,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-column address,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-details,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details {
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* WooCommerce notices inside content */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error {
  background: rgba(255,255,255,0.08) !important;
  border-top-color: rgba(255,255,255,0.28) !important;
  color: rgba(255,255,255,0.90) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message::before,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info::before {
  color: rgba(255,255,255,0.60) !important;
}

/* Column headings on order-detail page */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-column__title,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-details__title,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details h2 {
  color: rgba(255,255,255,0.90) !important;
  font-weight: 400;
}

/* Form inputs inside content */
body.woocommerce-account .woocommerce-MyAccount-content form .form-row input.input-text,
body.woocommerce-account .woocommerce-MyAccount-content form .form-row input[type="text"],
body.woocommerce-account .woocommerce-MyAccount-content form .form-row input[type="password"],
body.woocommerce-account .woocommerce-MyAccount-content form .form-row input[type="email"],
body.woocommerce-account .woocommerce-MyAccount-content form .form-row textarea,
body.woocommerce-account .woocommerce-MyAccount-content form .form-row select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.30);
  color: rgba(255,255,255,0.92);
  outline: none;
}
body.woocommerce-account .woocommerce-MyAccount-content form .form-row input:focus,
body.woocommerce-account .woocommerce-MyAccount-content form .form-row textarea:focus,
body.woocommerce-account .woocommerce-MyAccount-content form .form-row select:focus {
  border-color: rgba(255,255,255,0.32);
}

/* Buttons inside content */
body.woocommerce-account .woocommerce-MyAccount-content .button,
body.woocommerce-account .woocommerce-MyAccount-content button.button,
body.woocommerce-account .woocommerce-MyAccount-content a.button {
  border-radius: 999px;
  padding: 11px 22px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 400;
  text-transform: none;
  text-decoration: none;
  display: inline-block;
}
body.woocommerce-account .woocommerce-MyAccount-content .button:hover,
body.woocommerce-account .woocommerce-MyAccount-content button.button:hover,
body.woocommerce-account .woocommerce-MyAccount-content a.button:hover {
  background: rgba(255,255,255,0.22);
  text-decoration: none;
}

/* Tables */
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
  border-collapse: collapse;
  background: transparent;
  width: 100%;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.90);
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table thead th {
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════
   LOGIN PAGE
   WooCommerce structure:
     #customer_login
       .u-column1   ← h2 + form.woocommerce-form-login
       .u-column2   ← register form (hidden)
   ════════════════════════════════════════════════════════ */

/* Center the login section on white page */
body.woocommerce-account #customer_login {
  display: flex;
  justify-content: center;
  padding: 40px 16px 60px;
}

/* Hide register column */
body.woocommerce-account #customer_login .u-column2 {
  display: none;
}

/* Login card = entire .u-column1 — same visual style as .woocommerce-MyAccount-content */
body.woocommerce-account #customer_login .u-column1 {
  width: 100%;
  max-width: 450px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background-image: url('ma_card2.webp');
  background-size: cover;
  background-position: center;
  padding: 24px;
  box-sizing: border-box;
}
body.woocommerce-account #customer_login .u-column1::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  pointer-events: none;
  z-index: 0;
}
body.woocommerce-account #customer_login .u-column1 > * {
  position: relative;
  z-index: 1;
}

/* h2 heading inside the card */
body.woocommerce-account #customer_login .u-column1 > h2 {
  color: #fff !important;
  font-size: 1.4em;
  font-weight: 400;
  margin: 0 0 20px;
}

/* All login form text white */
body.woocommerce-account #customer_login form label,
body.woocommerce-account #customer_login form p,
body.woocommerce-account #customer_login form a,
body.woocommerce-account #customer_login form span,
body.woocommerce-account #customer_login form small {
  color: #fff !important;
}

/* Login inputs */
body.woocommerce-account #customer_login form input.input-text,
body.woocommerce-account #customer_login form input[type="text"],
body.woocommerce-account #customer_login form input[type="password"],
body.woocommerce-account #customer_login form input[type="email"] {
  width: 100% !important;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.30);
  color: #fff;
  outline: none;
  font-size: 16px;
}
body.woocommerce-account #customer_login form input:focus {
  border-color: rgba(255,255,255,0.35);
}

/* Login button */
body.woocommerce-account #customer_login form .button,
body.woocommerce-account #customer_login form button.button {
  border-radius: 999px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.15);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.20);
  font-weight: 400;
}
body.woocommerce-account #customer_login form .button:hover,
body.woocommerce-account #customer_login form button.button:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Remember me + submit row ── */
body.woocommerce-account #customer_login form.woocommerce-form-login .form-row.form-row-last {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
body.woocommerce-account #customer_login form.woocommerce-form-login .form-row.form-row-last button { order: 1; }
body.woocommerce-account #customer_login form.woocommerce-form-login .form-row.form-row-last label.woocommerce-form__label-for-checkbox {
  order: 2;
  margin: 0;
}

/* ── Lost / reset password pages ── */
body.woocommerce-account .woocommerce form.lost_reset_password,
body.woocommerce-account .woocommerce form.woocommerce-ResetPassword {
  max-width: 400px;
  margin: 40px auto;
  padding: 34px 30px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  background-image: url('ma_card2.webp');
  background-size: cover;
  background-position: center;
  box-sizing: border-box;
}
body.woocommerce-account .woocommerce form.lost_reset_password::before,
body.woocommerce-account .woocommerce form.woocommerce-ResetPassword::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
  pointer-events: none;
  z-index: 0;
}
body.woocommerce-account .woocommerce form.lost_reset_password > *,
body.woocommerce-account .woocommerce form.woocommerce-ResetPassword > * {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.90);
}

/* ════════════════════════════════════════════════════════
   MOBILE  (≤ 900px)
   ════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

  body.woocommerce-account {
    background: #fff !important;
  }

  body.woocommerce-account .dtb-account-content-container {
    margin-top: 0;
  }

  /* Stack nav above content */
  body.woocommerce-account .woocommerce-MyAccount {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    max-width: 100%;
  }

  /* ── Nav strip: full-width with card1 bg ── */
  body.woocommerce-account .woocommerce-MyAccount-navigation {
    max-width: 100% !important;
    width: 100% !important;
    flex: none !important;
    border-radius: 0 !important;
    padding: 12px 10px 10px !important;
    background-image: url('ma_card1.webp') !important;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Horizontal pill row — right-aligned, 10px from edge */
  body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    align-items: center;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0 !important;
  }

  /* Pills */
  body.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
    padding: 9px 16px !important;
    border-radius: 999px !important;
    font-size: 13px;
    background: rgba(255,255,255,0.10) !important;
    color: rgba(255,255,255,0.85) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    background: rgba(255,255,255,0.24) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.24) !important;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
  }

  /* Logout: own row, right-aligned */
  body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: flex-end;
    margin-top: 2px;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a {
    font-size: 12px !important;
    padding: 7px 14px !important;
    background: rgba(200,50,50,0.18) !important;
    border-color: rgba(200,50,50,0.22) !important;
    color: rgba(255,160,160,0.92) !important;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background: rgba(200,50,50,0.32) !important;
    color: #fff !important;
  }

  /* ── Content card: full-width, card2 bg ── */
  body.woocommerce-account .woocommerce-MyAccount-content {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    padding: 20px 12px 40px !important;
    margin: 0;
    min-height: 60vh;
    background-image: url('ma_card2.webp') !important;
  }

  /* Orders table: stacked card layout — no horizontal scroll */
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table {
    display: block;
    width: 100%;
    min-width: 0;
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table thead {
    display: none;
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tbody,
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tr {
    display: block;
    width: 100%;
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.20);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.90);
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table td:last-child {
    border-bottom: none;
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table td::before {
    content: attr(data-title);
    color: rgba(255,255,255,0.50);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-right: 12px;
    flex-shrink: 0;
  }

  /* Other shop tables (order details etc.) — horizontal scroll fallback */
  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.shop_table:not(.woocommerce-orders-table) {
    min-width: 460px;
  }

  /* Touch-friendly inputs */
  body.woocommerce-account .woocommerce form .form-row input.input-text,
  body.woocommerce-account .woocommerce form .form-row select,
  body.woocommerce-account .woocommerce form .form-row textarea {
    font-size: 16px;
    padding: 14px 12px;
  }

  /* Full-width buttons */
  body.woocommerce-account .woocommerce-MyAccount-content .button,
  body.woocommerce-account .woocommerce-MyAccount-content button.button,
  body.woocommerce-account .woocommerce-MyAccount-content a.button {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    box-sizing: border-box;
    display: block;
  }

  /* ── Login card: full-width on mobile ── */
  body.woocommerce-account #customer_login {
    padding: 20px 5px 40px;
  }
  body.woocommerce-account #customer_login .u-column1 {
    max-width: 100%;
    border-radius: 18px;
  }

  /* Login button full-width */
  body.woocommerce-account #customer_login form .button,
  body.woocommerce-account #customer_login form button.button {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    box-sizing: border-box;
    display: block;
  }
}
