/* ─────────────────────────────────────────────────────────────
   Parcl9 Auth — Form Styles
   Matches the Parcl9 theme design tokens exactly.
───────────────────────────────────────────────────────────── */

.p9a-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

.p9a-card {
  background: #ffffff;
  border: 1px solid rgba(154, 111, 46, 0.18);
  border-radius: 4px;
  padding: 2.5rem 2.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 1px 3px rgba(26, 24, 20, 0.06), 0 1px 2px rgba(26, 24, 20, 0.04);
}

/* ── Typography ──────────────────────────────────────────── */

.p9a-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: #1a1814;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.p9a-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  color: #6b6458;
  margin: 0 0 1.75rem;
}

/* ── Alert ───────────────────────────────────────────────── */

.p9a-alert {
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.p9a-alert.is-error {
  background: #fdf2f2;
  border: 1px solid rgba(200, 60, 60, 0.25);
  color: #8b1a1a;
}

.p9a-alert.is-success {
  background: #f2fdf6;
  border: 1px solid rgba(46, 154, 90, 0.25);
  color: #1a4a2e;
}

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

.p9a-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.p9a-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.p9a-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.p9a-field label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #1a1814;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.p9a-field input {
  background: #f5f2eb;
  border: 1px solid rgba(154, 111, 46, 0.25);
  border-radius: 3px;
  padding: 0.65rem 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: #1a1814;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  width: 100%;
  box-sizing: border-box;
}

.p9a-field input:focus {
  border-color: rgba(154, 111, 46, 0.6);
  box-shadow: 0 0 0 3px rgba(154, 111, 46, 0.1);
}

.p9a-field input::placeholder {
  color: #a8a090;
}

.p9a-hint {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #a8a090;
}

/* ── Honeypot ─────────────────────────────────────────────── */

.p9a-hp {
  display: none !important;
  visibility: hidden;
  position: absolute;
  left: -9999px;
}

/* ── Buttons ─────────────────────────────────────────────── */

.p9a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.22s ease, opacity 0.22s ease, color 0.22s ease;
  white-space: nowrap;
}

.p9a-btn:disabled,
.p9a-btn.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.p9a-btn-primary {
  background: #9a6f2e;
  color: #ffffff;
  width: 100%;
  margin-top: 0.5rem;
}

.p9a-btn-primary:hover {
  background: #b8883e;
}

.p9a-btn-outline {
  background: transparent;
  color: #9a6f2e;
  border: 1px solid rgba(154, 111, 46, 0.4);
}

.p9a-btn-outline:hover {
  background: rgba(154, 111, 46, 0.06);
  border-color: #9a6f2e;
}

.p9a-btn-ghost {
  background: transparent;
  color: #6b6458;
  border: 1px solid transparent;
}

.p9a-btn-ghost:hover {
  color: #1a1814;
  border-color: rgba(154, 111, 46, 0.2);
}

/* ── Switch link ─────────────────────────────────────────── */

.p9a-switch {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  color: #6b6458;
  text-align: center;
  margin: 1.25rem 0 0;
}

.p9a-switch a {
  color: #9a6f2e;
  text-decoration: none;
}

.p9a-switch a:hover {
  text-decoration: underline;
}

/* ── Account block ───────────────────────────────────────── */

.p9a-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(154, 111, 46, 0.1);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.p9a-account-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a8a090;
}

.p9a-account-value {
  color: #1a1814;
  font-weight: 300;
}

.p9a-level-badge {
  background: rgba(154, 111, 46, 0.1);
  color: #9a6f2e;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
}

.p9a-upgrade-wrap {
  margin-top: 1.5rem;
}

.p9a-upgrade-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a8a090;
  margin: 0 0 0.75rem;
}

.p9a-upgrade-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.p9a-account-actions {
  margin-top: 1.75rem;
  display: flex;
  justify-content: flex-end;
}

/* ── Misc ────────────────────────────────────────────────── */

.p9a-notice {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #6b6458;
}

.p9a-notice a {
  color: #9a6f2e;
}

/* ── Levels / Pricing grid ───────────────────────────────── */

/*
 * Lift the 760px max-width that WP's constrained layout applies to every
 * ancestor of the levels grid.  :has() is supported in all modern browsers
 * and is scoped to only pages that contain the pricing grid.
 */
.container--narrow:has(.p9a-levels-wrap),
.is-layout-constrained:has(> .p9a-levels-wrap),
.entry-content:has(.p9a-levels-wrap) {
  max-width: none !important;
  width: 100% !important;
}

.p9a-levels-wrap {
  display: block !important;
  width: 100% !important;
  max-width: none !important;  /* override is-layout-constrained's child constraint */
  padding: 3rem clamp(1rem, 4vw, 3rem);
  box-sizing: border-box;
}

.p9a-levels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  box-sizing: border-box;
}

.p9a-level-card {
  background: #ffffff;
  border: 1px solid rgba(154, 111, 46, 0.18);
  border-radius: 4px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.p9a-level-card:hover {
  box-shadow: 0 4px 16px rgba(26, 24, 20, 0.08);
  border-color: rgba(154, 111, 46, 0.35);
}

.p9a-level-card.is-featured {
  border-color: #9a6f2e;
  box-shadow: 0 4px 20px rgba(154, 111, 46, 0.14);
}

.p9a-level-card.is-current {
  background: #fdf9f3;
  border-color: rgba(154, 111, 46, 0.4);
}

.p9a-level-badge-top {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a6f2e;
  background: rgba(154, 111, 46, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  align-self: flex-start;
}

.p9a-level-badge-current {
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.1);
}

.p9a-level-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #1a1814;
  line-height: 1.2;
}

.p9a-level-price {
  margin: 0.25rem 0;
}

.p9a-price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.p9a-price-amount {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 300;
  color: #1a1814;
  line-height: 1;
}

.p9a-price-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.15rem;
}

.p9a-price-unit {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b6458;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.p9a-price-billing {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  color: #a8a090;
  line-height: 1.2;
}

.p9a-level-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.83rem;
  font-weight: 300;
  color: #6b6458;
  line-height: 1.55;
  margin: 0;
  flex: 1; /* pushes the action button to the bottom */
}

.p9a-level-action {
  margin-top: auto;
  padding-top: 1rem;
}

.p9a-level-action .p9a-btn {
  width: 100%;
}

.p9a-btn-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* Override theme link/button color inside level cards */
.p9a-level-action .p9a-btn-primary,
.p9a-level-action .p9a-btn-primary:hover,
.p9a-level-action .p9a-btn-primary:visited,
.p9a-level-action .p9a-btn-primary:focus {
  color: #ffffff !important;
}

.p9a-level-action .p9a-btn-outline,
.p9a-level-action .p9a-btn-outline:hover,
.p9a-level-action .p9a-btn-outline:visited,
.p9a-level-action .p9a-btn-outline:focus {
  color: #9a6f2e !important;
}

.p9a-level-action .p9a-btn-ghost,
.p9a-level-action .p9a-btn-ghost:hover,
.p9a-level-action .p9a-btn-ghost:visited {
  color: #a8a090 !important;
}

/* ── Enterprise banner ───────────────────────────────────── */

.p9a-level-enterprise {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(154, 111, 46, 0.18);
  border-radius: 4px;
  padding: 2rem 2.5rem;
}

.p9a-enterprise-info .p9a-level-name {
  color: #1a1814;
}

.p9a-enterprise-info .p9a-level-desc {
  color: #6b6458;
  margin-top: 0.4rem;
}

.p9a-level-enterprise .p9a-btn-outline,
.p9a-level-enterprise .p9a-btn-outline:hover,
.p9a-level-enterprise .p9a-btn-outline:visited,
.p9a-level-enterprise .p9a-btn-outline:focus {
  color: #9a6f2e !important;
  border-color: rgba(154, 111, 46, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

.p9a-level-enterprise:hover {
  box-shadow: 0 4px 16px rgba(26, 24, 20, 0.08);
  border-color: rgba(154, 111, 46, 0.35);
}

.p9a-level-enterprise .p9a-btn-outline:hover {
  background: rgba(154, 111, 46, 0.08);
  border-color: #9a6f2e;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .p9a-levels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .p9a-levels-grid {
    grid-template-columns: 1fr;
  }
  .p9a-level-enterprise {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }
  .p9a-level-enterprise .p9a-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .p9a-card {
    padding: 1.75rem 1.25rem;
  }
  .p9a-row-2 {
    grid-template-columns: 1fr;
  }
}
