/* Shared My Account design system. Keep endpoint-specific assets focused on behavior. */
body.woocommerce-account {
  --dashboard-font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  --dashboard-ink: #0f172a;
  --dashboard-text: #334155;
  --dashboard-muted: #475569;
  --dashboard-overline: #64748b;
  --dashboard-border: #e2e8f0;
  --dashboard-input-border: #cbd5e1;
  --dashboard-brand: #105942;
  --dashboard-brand-soft: #ecfdf5;
  --dashboard-surface: #ffffff;
  --dashboard-canvas: #f6f8fb;
  --dashboard-card-radius: 16px;
  --dashboard-card-padding: 32px;
  --dashboard-grid-gap: 32px;
  background: var(--dashboard-canvas);
  font-family: var(--dashboard-font-family);
}

body.woocommerce-account,
body.woocommerce-account .woocommerce,
body.woocommerce-account .woocommerce * {
  font-family: var(--dashboard-font-family);
}

body.woocommerce-account .woocommerce {
  box-sizing: border-box;
  grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
  align-items: start;
  gap: var(--dashboard-grid-gap);
  width: min(calc(100% - 2rem), 1120px);
  max-width: 1120px;
  color: var(--dashboard-text);
}

body.woocommerce-account .woocommerce::before,
body.woocommerce-account .woocommerce::after {
  display: none;
}

/* Messaging adds a wider-shell exception; normalize it back to the account grid. */
body.woocommerce-account .woocommerce:has(.maubazaar-message-board) {
  gap: var(--dashboard-grid-gap);
  width: min(calc(100% - 2rem), 1120px);
  max-width: 1120px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
  box-sizing: border-box;
  float: none;
  min-width: 0;
  width: auto;
  margin: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
  border: 1px solid var(--dashboard-border);
  border-radius: var(--dashboard-card-radius);
  background: var(--dashboard-surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  gap: 4px;
  padding: 12px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--dashboard-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
body.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible {
  background: #f8fafc;
  color: var(--dashboard-brand);
  transform: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation .is-active > a,
body.woocommerce-account .woocommerce-MyAccount-navigation a[aria-current="page"],
body.woocommerce-account .woocommerce-MyAccount-navigation-link--sell a[aria-current="page"] {
  background: #ecfdf5;
  box-shadow: none;
  color: #105942;
  font-weight: 600;
}

@media (min-width: 901px) {
  body.woocommerce-account .woocommerce-MyAccount-navigation {
    position: sticky;
    z-index: 20;
    top: 120px;
    align-self: start;
    height: max-content;
    max-height: calc(100vh - 140px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.woocommerce-account .woocommerce-MyAccount-content {
    grid-column: 2;
  }
}

.dashboard-content-card {
  box-sizing: border-box;
  width: 100%;
  padding: var(--dashboard-card-padding);
  border: 1px solid var(--dashboard-border);
  border-radius: var(--dashboard-card-radius);
  background: var(--dashboard-surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  color: var(--dashboard-text);
  font-family: var(--dashboard-font-family);
}

/* The page title remains a page-level heading; card headings stay smaller. */
body.woocommerce-account .wp-block-post-title,
body.woocommerce-account .dashboard-content-card > h1,
body.woocommerce-account .dashboard-content-card > header h1,
body.woocommerce-account .dashboard-content-card .maubazaar-dashboard-header h1,
body.woocommerce-account .dashboard-content-card .maubazaar-orders__header h1,
body.woocommerce-account .dashboard-content-card .maubazaar-sales__header h1,
body.woocommerce-account .dashboard-content-card .maubazaar-message-board__header h1 {
  box-sizing: border-box;
  margin: 0 0 32px;
  color: var(--dashboard-ink);
  font-family: var(--dashboard-font-family);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

.dashboard-content-card h2,
.dashboard-content-card h3 {
  color: var(--dashboard-ink);
  font-family: var(--dashboard-font-family);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0 0 8px;
}

.dashboard-content-card p {
  color: var(--dashboard-muted);
  font-family: var(--dashboard-font-family);
  font-size: 14px;
  line-height: 1.6;
}

.dashboard-content-card .maubazaar-dashboard-eyebrow,
.dashboard-content-card .maubazaar-orders__eyebrow,
.dashboard-content-card .maubazaar-sales__eyebrow,
.dashboard-content-card .maubazaar-sales__section-eyebrow,
.dashboard-content-card .maubazaar-messages__eyebrow,
.dashboard-content-card .maubazaar-account-details__eyebrow,
.dashboard-content-card .maubazaar-seller-eyebrow,
.dashboard-content-card .maubazaar-dashboard-section-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: var(--dashboard-overline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.dashboard-content-card .dashboard-form-label,
.dashboard-content-card .woocommerce-form-row > label,
.dashboard-content-card .maubazaar-seller-field > label,
.dashboard-content-card .maubazaar-message-form > label {
  display: block;
  margin: 0 0 6px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.dashboard-content-card .dashboard-form-input,
body.woocommerce-account .dashboard-content-card.maubazaar-account-details input.input-text,
.dashboard-content-card input[type="text"],
.dashboard-content-card input[type="email"],
body.woocommerce-account .dashboard-content-card textarea,
.dashboard-content-card select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 1.5px solid var(--dashboard-input-border);
  border-radius: 10px;
  background: var(--dashboard-surface);
  color: #1e293b;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.dashboard-content-card .dashboard-form-input,
body.woocommerce-account .dashboard-content-card.maubazaar-account-details input.input-text,
.dashboard-content-card input[type="text"],
.dashboard-content-card input[type="email"],
.dashboard-content-card select {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
}

body.woocommerce-account .dashboard-content-card textarea {
  min-height: 120px;
  padding: 12px 16px;
  resize: vertical;
}

.dashboard-content-card .dashboard-form-input:focus,
.dashboard-content-card input[type="text"]:focus,
.dashboard-content-card input[type="email"]:focus,
body.woocommerce-account .dashboard-content-card textarea:focus,
.dashboard-content-card select:focus,
.dashboard-content-card .dashboard-form-input:focus-visible,
.dashboard-content-card input[type="text"]:focus-visible,
.dashboard-content-card input[type="email"]:focus-visible,
body.woocommerce-account .dashboard-content-card textarea:focus-visible,
.dashboard-content-card select:focus-visible {
  border-color: var(--dashboard-brand);
  box-shadow: 0 0 0 3px rgba(16, 89, 66, 0.1);
  outline: none;
}

.dashboard-content-card input[type="text"]:hover,
.dashboard-content-card input[type="email"]:hover,
body.woocommerce-account .dashboard-content-card textarea:hover,
.dashboard-content-card select:hover {
  border-color: #94a3b8;
}

.dashboard-content-card input[type="text"]::placeholder,
.dashboard-content-card input[type="email"]::placeholder,
body.woocommerce-account .dashboard-content-card textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.dashboard-content-card .maubazaar-message-form__footer small,
.dashboard-content-card .maubazaar-seller-form-note,
.dashboard-content-card .maubazaar-seller-save-guidance {
  color: var(--dashboard-muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  body.woocommerce-account .woocommerce:has(.maubazaar-message-board) {
    gap: 20px;
    width: min(calc(100% - 2rem), 720px);
    max-width: 720px;
  }

  body.woocommerce-account .woocommerce {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: min(calc(100% - 2rem), 720px);
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce-MyAccount-content {
    grid-column: auto;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .dashboard-content-card {
    padding: 20px;
  }

  body.woocommerce-account .wp-block-post-title,
  body.woocommerce-account .dashboard-content-card > h1,
  body.woocommerce-account .dashboard-content-card > header h1,
  body.woocommerce-account .dashboard-content-card .maubazaar-dashboard-header h1,
  body.woocommerce-account .dashboard-content-card .maubazaar-orders__header h1,
  body.woocommerce-account .dashboard-content-card .maubazaar-sales__header h1,
  body.woocommerce-account .dashboard-content-card .maubazaar-message-board__header h1 {
    margin-bottom: 24px;
    font-size: 32px;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation a {
    padding: 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.woocommerce-account .woocommerce-MyAccount-navigation a,
  .dashboard-content-card .dashboard-form-input,
  .dashboard-content-card input[type="text"],
  .dashboard-content-card input[type="email"],
  body.woocommerce-account .dashboard-content-card textarea,
  .dashboard-content-card select {
    transition: none;
  }
}
