:root {
  --mj-woo-bg: #132a3b;
  --mj-woo-surface: #1e3a50;
  --mj-woo-surface-soft: #223f55;
  --mj-woo-text: #f0ebe3;
  --mj-woo-muted: rgba(240, 235, 227, 0.68);
  --mj-woo-rose: #c8114c;
  --mj-woo-gold: #d29629;
  --mj-woo-border: rgba(255, 255, 255, 0.1);
  --mj-woo-radius: 12px;
  --mj-woo-max: 1040px;
}

/* ── Fundo ── */
html body.mj-woo-thankyou-page,
html body.mj-woo-account-page,
body.mj-woo-thankyou-page,
body.mj-woo-account-page {
  background: var(--mj-woo-bg) !important;
  color: var(--mj-woo-text);
  font-size: 0.9375rem;
  line-height: 1.55;
}

body.mj-woo-thankyou-page #page,
body.mj-woo-thankyou-page .site,
body.mj-woo-thankyou-page .site-content,
body.mj-woo-account-page #page,
body.mj-woo-account-page .site,
body.mj-woo-account-page .site-content,
body.mj-woo-thankyou-page .elementor-location-header ~ *:not(.elementor-location-footer),
body.mj-woo-account-page .elementor-location-header ~ *:not(.elementor-location-footer) {
  background: var(--mj-woo-bg) !important;
}

body.mj-woo-thankyou-page .site-main,
body.mj-woo-account-page .site-main {
  padding: 2rem 1rem 3.5rem;
}

/* ── Tipografia ── */
.mj-woo-eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mj-woo-muted);
  font-weight: 600;
}

.mj-woo-lead,
.mj-woo-note {
  margin: 0;
  color: var(--mj-woo-muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.mj-woo-note a {
  color: var(--mj-woo-gold);
}

/* ── Botões MJ (só os nossos) ── */
.mj-woo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--mj-woo-rose);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.875rem;
  border: 0;
  line-height: 1.3;
}

.mj-woo-btn--ghost {
  background: transparent;
  color: var(--mj-woo-text) !important;
  border: 1px solid var(--mj-woo-border);
}

/* Botão primário WooCommerce (salvar, acessar) */
body.mj-woo-account-page .woocommerce-MyAccount-content form .button,
body.mj-woo-account-page #customer_login .woocommerce-form-login__submit,
body.mj-woo-account-page #customer_login .woocommerce-form-register__submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-height: 0 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 999px !important;
  background: var(--mj-woo-rose) !important;
  color: #fff !important;
  border: 0 !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  line-height: 1.3 !important;
}

/* Botões em tabelas (pedidos, acessos) — discretos */
body.mj-woo-account-page .shop_table .button,
body.mj-woo-account-page .woocommerce-orders-table .button,
body.mj-woo-account-page .woocommerce-pagination .button,
body.mj-woo-account-page .woocommerce-MyAccount-downloads .download-file a,
body.mj-woo-account-page .woocommerce-table--order-downloads .download-file a {
  display: inline-block !important;
  width: auto !important;
  min-height: 0 !important;
  padding: 0.35rem 0.7rem !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--mj-woo-text) !important;
  border: 1px solid var(--mj-woo-border) !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

body.mj-woo-account-page .shop_table .button:hover,
body.mj-woo-account-page .woocommerce-MyAccount-downloads .download-file a:hover,
body.mj-woo-account-page .woocommerce-table--order-downloads .download-file a:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

/* ══════════════════════════════════════
   Obrigado
   ══════════════════════════════════════ */
body.mj-woo-thankyou-page .woocommerce-order {
  width: min(100%, var(--mj-woo-max));
  margin: 0 auto;
}

.mj-woo-thankyou-hero,
.mj-woo-account-promo,
body.mj-woo-thankyou-page .woocommerce-order-details,
body.mj-woo-thankyou-page .woocommerce-customer-details {
  background: var(--mj-woo-surface);
  border: 1px solid var(--mj-woo-border);
  border-radius: var(--mj-woo-radius);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
}

.mj-woo-thankyou-hero h2,
.mj-woo-account-promo h3 {
  margin: 0 0 0.45rem;
  font-size: 1.125rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.35;
}

body.mj-woo-thankyou-page .woocommerce-notice--success {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--mj-woo-border);
  border-radius: var(--mj-woo-radius);
  color: var(--mj-woo-muted);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

body.mj-woo-thankyou-page .woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
}

body.mj-woo-thankyou-page .woocommerce-order-overview li {
  background: var(--mj-woo-surface);
  border: 1px solid var(--mj-woo-border);
  border-radius: var(--mj-woo-radius);
  padding: 0.7rem 0.85rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--mj-woo-muted);
}

body.mj-woo-thankyou-page .woocommerce-order-overview li strong {
  display: block;
  margin-top: 0.2rem;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

body.mj-woo-thankyou-page .woocommerce-order-details__title,
body.mj-woo-thankyou-page .woocommerce-column__title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0;
}

.mj-woo-account-promo p,
.mj-woo-account-promo__list {
  margin: 0 0 0.65rem;
  color: var(--mj-woo-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.mj-woo-account-promo__list {
  padding-left: 1rem;
}

.mj-woo-account-promo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

/* ══════════════════════════════════════
   Meu espaço
   ══════════════════════════════════════ */
body.mj-woo-account-page .elementor-widget-woocommerce-my-account {
  width: min(100%, var(--mj-woo-max));
  margin: 0 auto;
  font-size: 0.9375rem;
}

body.mj-woo-account-page .elementor-widget-woocommerce-my-account .woocommerce {
  color: var(--mj-woo-text);
}

/* Layout Elementor: nav + conteúdo */
body.mj-woo-account-page .e-my-account-tab .woocommerce .woocommerce-MyAccount-navigation {
  width: 28%;
  float: inline-start;
}

body.mj-woo-account-page .e-my-account-tab .woocommerce-MyAccount-content {
  width: 72%;
  float: inline-end;
  padding-inline-start: 1.5rem !important;
}

/* Remover fundos claros do Elementor */
body.mj-woo-account-page .e-my-account-tab__downloads .woocommerce-MyAccount-content-wrapper,
body.mj-woo-account-page .e-my-account-tab__orders .woocommerce-MyAccount-content-wrapper,
body.mj-woo-account-page .e-my-account-tab__edit-account .woocommerce-MyAccount-content-wrapper,
body.mj-woo-account-page .e-my-account-tab__edit-address .woocommerce-MyAccount-content-wrapper,
body.mj-woo-account-page .e-my-account-tab__dashboard .woocommerce-MyAccount-content-wrapper {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

/* Navegação — minimalista */
body.mj-woo-account-page .woocommerce-MyAccount-navigation {
  background: var(--mj-woo-surface);
  border: 1px solid var(--mj-woo-border);
  border-radius: var(--mj-woo-radius);
  padding: 0.5rem;
}

body.mj-woo-account-page .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

body.mj-woo-account-page .elementor-widget-woocommerce-my-account .woocommerce-MyAccount-navigation ul li:after {
  display: none !important;
}

body.mj-woo-account-page .woocommerce-MyAccount-navigation li a,
body.mj-woo-account-page .elementor-widget-woocommerce-my-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.5rem 0.65rem !important;
  border-radius: 8px !important;
  color: var(--mj-woo-muted) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  background: transparent !important;
  border: 0 !important;
  text-align: start !important;
}

body.mj-woo-account-page .woocommerce-MyAccount-navigation li a:hover,
body.mj-woo-account-page .elementor-widget-woocommerce-my-account .woocommerce-MyAccount-navigation ul li a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

body.mj-woo-account-page .woocommerce-MyAccount-navigation li.is-active a,
body.mj-woo-account-page .elementor-widget-woocommerce-my-account .woocommerce-MyAccount-navigation ul li.is-active a {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: inset 2px 0 0 var(--mj-woo-rose);
}

/* Conteúdo */
body.mj-woo-account-page .woocommerce-MyAccount-content {
  background: var(--mj-woo-surface);
  border: 1px solid var(--mj-woo-border);
  border-radius: var(--mj-woo-radius);
  padding: 1.15rem 1.2rem;
}

body.mj-woo-account-page .woocommerce-MyAccount-content h2,
body.mj-woo-account-page .woocommerce-MyAccount-content h3 {
  color: #fff;
  font-size: 1rem !important;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

body.mj-woo-account-page .woocommerce-MyAccount-content p {
  color: var(--mj-woo-muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

/* Dashboard */
.mj-woo-dashboard h2 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
}

.mj-woo-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 0.85rem;
}

.mj-woo-dash-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--mj-woo-border);
  text-decoration: none !important;
}

.mj-woo-dash-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.mj-woo-dash-card__label {
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
}

.mj-woo-dash-card__hint {
  color: var(--mj-woo-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Tabelas */
body.mj-woo-account-page .shop_table,
body.mj-woo-account-page table.shop_table {
  width: 100%;
  background: transparent;
  border-color: var(--mj-woo-border) !important;
  color: var(--mj-woo-text);
  border-radius: 10px;
  font-size: 0.875rem;
}

body.mj-woo-account-page .shop_table th,
body.mj-woo-account-page .shop_table td {
  border-color: var(--mj-woo-border) !important;
  color: var(--mj-woo-text);
  padding: 0.6rem 0.7rem;
  vertical-align: middle;
}

body.mj-woo-account-page .shop_table thead th {
  background: rgba(0, 0, 0, 0.15);
  color: var(--mj-woo-muted);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

body.mj-woo-account-page .shop_table a:not(.button) {
  color: var(--mj-woo-gold);
  font-weight: 500;
}

/* Acessos — coluna de download alinhada */
body.mj-woo-account-page .woocommerce-MyAccount-downloads .shop_table .download-file,
body.mj-woo-account-page .woocommerce-table--order-downloads .download-file {
  text-align: end;
  white-space: nowrap;
}

body.mj-woo-account-page .woocommerce-MyAccount-downloads .shop_table .download-remaining,
body.mj-woo-account-page .woocommerce-table--order-downloads .download-remaining {
  font-size: 0.8125rem;
  color: var(--mj-woo-muted);
}

/* Formulários */
body.mj-woo-account-page .woocommerce form .form-row label {
  color: var(--mj-woo-text);
  font-weight: 500;
  font-size: 0.875rem;
}

body.mj-woo-account-page .woocommerce form .input-text,
body.mj-woo-account-page .woocommerce form select,
body.mj-woo-account-page .woocommerce form textarea {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--mj-woo-border);
  border-radius: 8px;
  color: #fff;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
}

/* Login */
body.mj-woo-account-page #customer_login {
  gap: 1rem;
}

body.mj-woo-account-page #customer_login .u-column1,
body.mj-woo-account-page #customer_login .u-column2,
body.mj-woo-account-page .e-my-account-tab {
  background: var(--mj-woo-surface);
  border: 1px solid var(--mj-woo-border);
  border-radius: var(--mj-woo-radius);
  padding: 1.15rem 1.2rem;
}

body.mj-woo-account-page #customer_login h2 {
  color: #fff;
  font-size: 1rem;
  margin-top: 0;
}

body.mj-woo-account-page .woocommerce-info,
body.mj-woo-account-page .woocommerce-message {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--mj-woo-gold);
  color: var(--mj-woo-muted);
  border-radius: 8px;
  font-size: 0.875rem;
}

body.mj-woo-account-page .woocommerce-error {
  background: rgba(200, 17, 76, 0.1);
  border-left: 2px solid var(--mj-woo-rose);
  color: var(--mj-woo-text);
  border-radius: 8px;
  font-size: 0.875rem;
}

/* ══════════════════════════════════════
   Mobile
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  body.mj-woo-account-page .e-my-account-tab .woocommerce .woocommerce-MyAccount-navigation,
  body.mj-woo-account-page .e-my-account-tab .woocommerce-MyAccount-content {
    width: 100%;
    float: none;
    padding: 0 !important;
  }

  body.mj-woo-account-page .woocommerce-MyAccount-navigation {
    margin-bottom: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.mj-woo-account-page .woocommerce-MyAccount-navigation ul {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding-bottom: 0.15rem;
  }

  body.mj-woo-account-page .woocommerce-MyAccount-navigation li {
    flex: 0 0 auto;
  }

  body.mj-woo-account-page .woocommerce-MyAccount-navigation li a {
    white-space: nowrap;
    padding: 0.45rem 0.7rem !important;
    font-size: 0.8125rem !important;
  }

  body.mj-woo-account-page .woocommerce-MyAccount-navigation li.is-active a {
    box-shadow: inset 0 -2px 0 var(--mj-woo-rose);
  }

  .mj-woo-dashboard__grid {
    grid-template-columns: 1fr;
  }

  body.mj-woo-thankyou-page .woocommerce-order-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.mj-woo-thankyou-page .site-main,
  body.mj-woo-account-page .site-main {
    padding: 1.25rem 0.85rem 2.5rem;
  }

  body.mj-woo-account-page .woocommerce-MyAccount-content {
    padding: 1rem;
  }

  /* Tabela de acessos vira lista no celular */
  body.mj-woo-account-page .woocommerce-table--order-downloads thead {
    display: none;
  }

  body.mj-woo-account-page .woocommerce-table--order-downloads,
  body.mj-woo-account-page .woocommerce-table--order-downloads tbody,
  body.mj-woo-account-page .woocommerce-table--order-downloads tr,
  body.mj-woo-account-page .woocommerce-table--order-downloads td {
    display: block;
    width: 100%;
  }

  body.mj-woo-account-page .woocommerce-table--order-downloads tr {
    border: 1px solid var(--mj-woo-border);
    border-radius: 10px;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
  }

  body.mj-woo-account-page .woocommerce-table--order-downloads td {
    border: 0 !important;
    padding: 0.25rem 0 !important;
    text-align: start !important;
  }

  body.mj-woo-account-page .woocommerce-table--order-downloads td::before {
    content: attr(data-title);
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mj-woo-muted);
    margin-bottom: 0.15rem;
  }

  body.mj-woo-account-page .woocommerce-table--order-downloads .download-file {
    margin-top: 0.5rem;
    text-align: start !important;
  }

  body.mj-woo-account-page .woocommerce-table--order-downloads .download-file a {
    width: 100%;
    text-align: center;
  }

  .mj-woo-account-promo__actions {
    flex-direction: column;
  }

  .mj-woo-account-promo__actions .mj-woo-btn {
    width: 100%;
    justify-content: center;
  }
}
