/**
 * ProMkt — /minha-conta/ layout
 * Single-column: login panel first, registration toggled below via JS.
 * Scope: body.woocommerce-account only.
 */

/* ── Outer container — sem max-width para o hero ser full-bleed ──────────── */

body.woocommerce-account .wrapper-page #page-content {
  box-sizing: border-box;
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}

/* ── Espaçamento vertical abaixo do hero ─────────────────────────────────── */

body.woocommerce-account .container-layout-content {
  padding-top: clamp(24px, 3.6vw, 48px);
  padding-bottom: clamp(40px, 5.8vw, 90px);
}

/* ── Formulário de login/cadastro — centralizado e contido ───────────────── */

body.woocommerce-account .pm-account-login {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 520px;
  padding: 0 18px;
}

/* ── Panel wrapper ───────────────────────────────────────────────────────── */

.pm-account-login {
  position: relative;
}

/* ── Individual panels ───────────────────────────────────────────────────── */

.pm-account-panel {
  background: #ffffff;
  border: 1px solid rgba(20, 24, 39, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 20, 35, 0.08);
  padding: clamp(24px, 4vw, 44px) clamp(20px, 3.4vw, 40px);
}

.pm-account-panel[aria-hidden="true"] {
  display: none;
}

/* ── Panel heading ───────────────────────────────────────────────────────── */

.pm-account-panel__title {
  color: #101a34;
  font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.8rem);
  line-height: 1.2;
  margin: 0 0 24px;
}

/* ── Form rows ───────────────────────────────────────────────────────────── */

.pm-account-panel .woocommerce-form-row,
.pm-account-panel .form-row {
  margin-bottom: 16px;
}

.pm-account-panel .woocommerce-form-row label,
.pm-account-panel .form-row label {
  color: #344260;
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
}

/* ── Text inputs ─────────────────────────────────────────────────────────── */

.pm-account-panel .input-text,
.pm-account-panel .woocommerce-Input--text {
  background: #f8f9ff;
  border: 1.5px solid rgba(31, 44, 74, 0.18);
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 1rem;
  min-height: 50px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.pm-account-panel .input-text:focus,
.pm-account-panel .woocommerce-Input--text:focus {
  border-color: #2b4acb;
  box-shadow: 0 0 0 3px rgba(43, 74, 203, 0.15);
  outline: none;
}

/* ── Remember me + forgot password row ──────────────────────────────────── */

.pm-account-row--extras {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pm-remember-me {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 0.875rem;
  gap: 8px;
}

.pm-remember-me input[type="checkbox"] {
  flex-shrink: 0;
  height: 17px;
  width: 17px;
}

.pm-forgot-link {
  color: #2b4acb;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}

.pm-forgot-link:hover {
  text-decoration: underline;
}

/* ── Submit button ───────────────────────────────────────────────────────── */

.pm-submit-row {
  margin-bottom: 0;
  margin-top: 8px;
}

.pm-submit-row .button,
.pm-submit-row .pm-btn--primary {
  background: #2b4acb;
  border: none;
  border-radius: 10px;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  min-height: 50px;
  padding: 12px 20px;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
  width: 100%;
}

.pm-submit-row .button:hover,
.pm-submit-row .pm-btn--primary:hover {
  background: #1f38a6;
}

.pm-submit-row .button:active,
.pm-submit-row .pm-btn--primary:active {
  transform: scale(0.98);
}

.pm-submit-row .button:disabled,
.pm-submit-row .pm-btn--primary:disabled {
  background: #8fa3e8;
  cursor: not-allowed;
}

/* ── Password pending — dashboard notice ─────────────────────────────────── */

.pm-password-pending-notice {
  background: #fff8e1;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  color: #5a3e00;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 16px 18px;
}

.pm-password-pending-notice strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.pm-password-pending-notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pm-password-pending-notice__cta {
  border-radius: 8px;
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.pm-password-pending-notice__cta--primary {
  background: #2b4acb;
  color: #ffffff;
}

.pm-password-pending-notice__cta--primary:hover {
  background: #1f38a6;
  color: #ffffff;
}

.pm-password-pending-notice__cta--secondary {
  background: transparent;
  border: 1.5px solid #2b4acb;
  color: #2b4acb;
}

.pm-password-pending-notice__cta--secondary:hover {
  background: #eef1fb;
}

/* ── Password pending — nav links visually blocked ───────────────────────── */

.pm-password-pending .woocommerce-MyAccount-navigation-link:not(.woocommerce-MyAccount-navigation-link--dashboard):not(.woocommerce-MyAccount-navigation-link--edit-account):not(.woocommerce-MyAccount-navigation-link--customer-logout) > a {
  color: #b0b8cc;
  cursor: not-allowed;
  pointer-events: none;
}

.pm-password-pending .woocommerce-MyAccount-navigation-link:not(.woocommerce-MyAccount-navigation-link--dashboard):not(.woocommerce-MyAccount-navigation-link--edit-account):not(.woocommerce-MyAccount-navigation-link--customer-logout) > a::after {
  content: " 🔒";
  font-size: 0.75em;
}

/* ── Registration hint (post-submit orientation) ─────────────────────────── */

.pm-register-hint {
  background: #f0f4ff;
  border-left: 3px solid #2b4acb;
  border-radius: 0 8px 8px 0;
  color: #344260;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 14px 0 0;
  padding: 10px 14px;
}

/* ── Panel switch link (login ↔ register) ────────────────────────────────── */

.pm-account-switch {
  border-top: 1px solid rgba(20, 24, 39, 0.08);
  color: #5a6680;
  font-size: 0.9rem;
  margin: 20px 0 0;
  padding-top: 16px;
  text-align: center;
}

.pm-account-switch__link {
  color: #2b4acb;
  font-weight: 600;
  text-decoration: none;
}

.pm-account-switch__link:hover {
  text-decoration: underline;
}

/* ── Consent checkboxes ──────────────────────────────────────────────────── */

.pm-consent {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.pm-consent input[type="checkbox"] {
  flex-shrink: 0;
  height: 18px;
  margin-top: 2px;
  width: 18px;
}

.pm-consent label {
  color: #444c66;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 0;
}

.pm-consent label a {
  color: #2b4acb;
  text-decoration: underline;
}

.pm-consent--optional label {
  color: #6b7898;
}

/* ── WooCommerce notices ─────────────────────────────────────────────────── */

.pm-account-login .woocommerce-error,
.pm-account-login .woocommerce-message,
.pm-account-login .woocommerce-info {
  margin-bottom: 16px;
}

/* ── Required asterisk ───────────────────────────────────────────────────── */

.pm-account-panel .required {
  color: #c0392b;
}

/* ── Mobile (≤640px) ─────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  body.woocommerce-account .pm-account-login {
    padding-left: 12px;
    padding-right: 12px;
  }

  .pm-account-panel {
    border-radius: 10px;
    padding: 20px 16px;
  }

  .pm-account-row--extras {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ── Very small screens (≤380px) ─────────────────────────────────────────── */

@media (max-width: 380px) {
  body.woocommerce-account .pm-account-login {
    padding-left: 8px;
    padding-right: 8px;
  }

  .pm-account-panel {
    padding: 18px 14px;
  }
}
