/*
 * MetaHashtags 2: membership and affiliate pages.
 * Styles the markup of Paid Memberships Pro (shortcodes, parent template
 * overrides, mh2 checkout.php) and AffiliateWP: white cards on the light
 * page, 46px inputs, buttons in the brand palette (teal for the free
 * account, orange for Pro, blue for everything else; PayPal's gold only
 * while PayPal is the chosen payment method).
 */

.account-page { padding-bottom: 56px; }
.account-page > .account-content {
  padding: 22px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card);
}
@media (min-width: 720px) { .account-page > .account-content { padding: 28px 32px; } }
.account-page > .account-content:has(#pmpro_account) { padding: 0; border: 0; background: none; box-shadow: none; }
.account-content { display: flex; flex-direction: column; gap: 16px; font-size: 16px; }
.account-content > * { margin: 0; }
.account-content h2, .account-content h3 { font-size: 20px; margin: 18px 0 6px; }
.account-content h4, .account-content h5 { font-size: 17px; margin: 14px 0 6px; font-family: var(--font-display); font-weight: 800; }
.account-content p { margin: 0 0 10px; }
.account-content ul, .account-content ol { padding-left: 1.2em; }
.account-content a { font-weight: 700; }
.confirmation-content { margin-top: 32px; }

/* Login */
.login-page form.card { margin-top: 40px; gap: 16px; padding: 28px 24px; box-shadow: var(--shadow-panel); }
.login-page form.card .page-title { font-size: clamp(28px, 6vw, 34px); }
.check-row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 10px; cursor: pointer; font-size: 15px; font-weight: 600; line-height: 1.45; }
.check-row input { flex: none; margin: 1px 0 0; }
/* PMPro's frontend.css caps fields at 90%: full-width fields. */
.account-page form.pmpro_form input:not([type="checkbox"]):not([type="radio"]), .account-page form.pmpro_form select, .account-page form.pmpro_form textarea,
.account-page #loginform input, .account-page #lostpasswordform input { max-width: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 14px; color: var(--ink-2); }
.form-foot .link-btn { min-height: 44px; }

/* Register / checkout (paid-memberships-pro/pages/checkout.php) */
.register-page { padding-top: 32px; }
@media (min-width: 720px) { .register-page { padding-top: 48px; } }
.account-page.register-page > .account-content { display: block; padding: 0; border: 0; background: none; box-shadow: none; }
.register-page .mh-checkout p { margin: 0; }
.mh-checkout { display: flex; flex-direction: column; gap: 20px; }
/* No empty slot (and gap) while there is no message; PMPro and Stripe show #pmpro_message when there is one. */
.mh-checkout #errorMessages { display: contents; }
.mh-fields { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.mh-field { display: flex; flex-direction: column; min-width: 0; }
.mh-field .field-error { margin-top: 6px; }
.mh-field:has(.field-error:not([hidden])) .field-help { display: none; }
@media (min-width: 600px) { .mh-fields .mh-field-wide { grid-column: 1 / -1; } }
.mh-exp { display: flex; align-items: center; gap: 8px; }
.mh-exp select { flex: 1; }
.mh-inline { display: flex; gap: 8px; }
.mh-inline input[type="text"] { flex: 1; }
.pw-wrap { position: relative; }
.account-page .pw-wrap input { padding-right: 92px; }
.pw-toggle {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font: 700 14px/1 var(--font-body); cursor: pointer;
}
.pw-toggle:hover { background: var(--chip); color: var(--ink); }
.pw-toggle[aria-pressed="true"] { color: var(--link); }
.mh-legal { font-size: 13px; line-height: 1.55; color: var(--muted); }
.mh-legal a { color: var(--ink-2); font-weight: 700; }
.mh-legal a:hover { color: var(--ink); }
.pmpro_submit { display: flex; flex-direction: column; gap: 8px; }
.btn.is-busy, .btn.is-busy[disabled] { opacity: 0.8; cursor: progress; }
/* PayPal's own button colours (their brand guidelines), only while PayPal is the chosen method */
.btn-paypal { background: #ffc439; color: #111; }
.btn-paypal:hover:not([disabled]) { background: #f4bb2f; color: #111; }
.pmpro_hidden, .pmpro_checkout-field.pmpro_hidden { display: none !important; }
[aria-invalid="true"] { border-color: var(--red) !important; }

/* Free sign-up: one card, what you get beside it */
.mh-signup { display: grid; gap: 28px; max-width: 940px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 880px) { .mh-signup { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 64px; } }
.auth-card { padding: 28px 20px 24px; box-shadow: var(--shadow-panel); }
@media (min-width: 480px) { .auth-card { padding: 36px 36px 28px; } }
.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-title { font: 900 clamp(27px, 5vw, 31px)/1.12 var(--font-display); letter-spacing: -0.02em; }
.auth-lede { color: var(--ink-2); }
.register-page .auth-alt { margin-top: 2px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 15px; color: var(--ink-2); }
.auth-aside { display: flex; flex-direction: column; gap: 18px; }
.auth-aside-title { font: 800 21px/1.3 var(--font-display); }
.auth-aside .ticks { font-size: 16px; gap: 10px; }
.auth-step { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--blue-wash); color: var(--link); font-size: 15px; font-weight: 700; }
.auth-step .icon { margin-top: 2px; }
.auth-pro { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink-2); }
.auth-pro .tag-pro { flex: none; }
.auth-pro a { font-weight: 700; }
.auth-done { margin: 0 auto; }

/* Pro checkout: heading, form card, order summary on the right */
.mh-co { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "form" "summary"; }
.co-head { grid-area: head; display: flex; flex-direction: column; gap: 10px; }
.co-head .page-lede { max-width: 52ch; }
.co-form { grid-area: form; padding: 24px 18px; gap: 24px; box-shadow: var(--shadow-panel); }
@media (min-width: 600px) { .co-form { padding: 32px; } }
.co-summary { grid-area: summary; }
@media (min-width: 960px) {
  .mh-co { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "head ." "form summary"; column-gap: 40px; row-gap: 28px; align-items: start; }
  .co-summary { position: sticky; top: 96px; }
}
.co-sec { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.register-page fieldset.co-sec { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; }
.co-sec + .co-sec, .co-signed + .co-sec, .co-sec + .pmpro_submit { padding-top: 24px; border-top: 1px solid var(--line); }
.register-page .co-sec-title {
  display: flex; align-items: center; gap: 10px; float: none; width: 100%; margin: 0; padding: 0;
  font: 800 19px/1.3 var(--font-display); letter-spacing: -0.005em; color: var(--ink);
}
.register-page legend.co-sec-title { margin-bottom: 16px; }
.co-num {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-wash); color: var(--link); font: 800 14px/1 var(--font-body);
}
@media (min-width: 600px) { .co-sec .mh-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.register-page .co-aside-note { font-size: 14px; color: var(--ink-2); }
.register-page .co-signed { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); font-size: 15px; color: var(--ink-2); }
.co-signed .icon { margin-top: 2px; color: var(--muted); }

/* Plan and payment-method choices: real radios, drawn as cards */
.co-plan-grid, .co-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.register-page .co-plan, .register-page .co-method {
  position: relative; display: flex; min-width: 0; margin: 0; border: 2px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.co-plan input, .co-method input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.register-page .co-plan:hover, .register-page .co-method:hover { border-color: var(--line-strong); }
.register-page .co-plan:has(input:checked), .register-page .co-method:has(input:checked) { border-color: var(--blue); background: var(--sel); }
.co-plan:has(input:focus-visible), .co-method:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.register-page .co-plan:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.register-page .co-plan { flex-direction: column; gap: 2px; padding: 16px; font-size: 15px; font-weight: 600; }
.co-plan::after {
  content: ""; position: absolute; top: 16px; right: 14px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--surface); pointer-events: none;
}
.co-plan:has(input:checked)::after { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 4px var(--surface); }
.co-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-right: 28px; }
.co-plan-name { font-weight: 800; font-size: 16px; }
.co-plan-price { margin-top: 6px; font: 900 27px/1.15 var(--font-display); letter-spacing: -0.01em; }
.co-plan-per { font: 600 14px var(--font-body); color: var(--ink-2); letter-spacing: 0; }
.co-plan-note { font-size: 13px; color: var(--ink-2); }
.co-plan-mine { font-size: 12px; font-weight: 800; color: var(--muted); }
@media (max-width: 419.98px) { .register-page .co-plan { padding: 14px 12px; } .co-plan-price { font-size: 23px; } .co-plan::after { right: 10px; } }
.register-page .co-method { align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 14px; font-size: 16px; font-weight: 800; }
.pp-word { font: italic 900 19px/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.03em; }
.pp-word b { font-weight: 900; color: #003087; }
.pp-word i { color: #009cde; }

/* Card fields: Stripe Elements mount into the .stripe-input boxes */
.co-card { display: flex; flex-direction: column; gap: 16px; }
.co-card-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-content .stripe-input { min-height: 46px; padding: 13px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--surface); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.account-content .stripe-input.StripeElement--focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(14, 140, 201, 0.18); }
.account-content .stripe-input.StripeElement--invalid { border-color: var(--red); }
.register-page .co-secure { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.register-page .co-paypal-note { padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); font-size: 15px; color: var(--ink-2); }
.co-discount summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 15px; color: var(--link); cursor: pointer; }
.co-discount .mh-inline { margin-top: 4px; }

/* Order summary */
.register-page .co-summary { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.co-summary-title { font: 800 17px/1.3 var(--font-display); }
.co-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-weight: 800; }
.co-line-name { display: flex; flex-direction: column; gap: 2px; }
.co-line-sub { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.co-line-price { white-space: nowrap; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 800; }
.co-total strong { font: 900 26px/1.2 var(--font-display); letter-spacing: -0.01em; }
.register-page .co-summary-note { font-size: 13px; color: var(--ink-2); }
.co-includes { padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.co-trust { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.co-trust li { display: flex; gap: 10px; align-items: flex-start; }
.co-trust .icon { margin-top: 1px; color: var(--teal-link); }
.co-trust strong { color: var(--ink); }

/* After sign-up: "Check your inbox" (page-confirmation.php) */
.confirm-card { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; padding: 32px 24px; text-align: center; box-shadow: var(--shadow-panel); }
@media (min-width: 480px) { .confirm-card { padding: 40px 40px 32px; } }
.confirm-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 50%; background: var(--blue-wash); color: var(--link); }
.confirm-card .page-title { font-size: clamp(28px, 6vw, 34px); }
.confirm-card .page-lede { margin: 0 auto; }
.confirm-help { font-size: 14px; color: var(--ink-2); }

/* PMPro messages */
.pmpro_message {
  margin: 0 0 8px; padding: 12px 14px; border-radius: var(--r); border: 0;
  background: var(--blue-wash); color: var(--link); font-weight: 700; font-size: 15px;
}
.pmpro_message.pmpro_error { background: var(--red-wash); color: var(--red-ink); }
.pmpro_message.pmpro_success { background: var(--teal-wash); color: var(--teal-ink); }
.pmpro_message.pmpro_alert { background: var(--orange-wash); color: var(--orange-ink); }
.pmpro_message a { color: inherit; text-decoration: underline; }
.pmpro_error input, input.pmpro_error, select.pmpro_error { border-color: var(--red) !important; }

/* PMPro account, invoices, billing, levels */
.pmpro_box, #pmpro_account .pmpro_box, .pmpro_checkout { border: 0; padding: 0; margin: 0; }
#pmpro_account { display: flex; flex-direction: column; gap: 16px; }
#pmpro_account .pmpro_box {
  padding: 0 20px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden;
}
#pmpro_account .pmpro_box > h3, #pmpro_account .pmpro_box > h2 {
  margin: 0 -20px 16px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line);
  font: 800 19px/1.3 var(--font-display); letter-spacing: 0; text-transform: none; color: var(--ink);
}
.pmpro_actionlinks, .pmpro_actions_nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.pmpro_actionlinks a, .pmpro_actions_nav a { display: inline-flex; align-items: center; min-height: 44px; }
#pmpro_actionlink-go-pro {
  padding: 0 16px; border-radius: var(--r); background: var(--orange); color: var(--orange-dark); text-decoration: none;
}
#pmpro_actionlink-go-pro:hover { background: var(--orange-hover); }
/* Stack the Stripe card fields: PMPro's default markup uses a CSS grid, and the customised markup on this
   site uses Bootstrap rows/columns (.form-row, .col-md-*) without Bootstrap loaded; both collapse on phones. */
.account-content #pmpro_payment_information_fields .pmpro_checkout-fields,
.account-content #pmpro_payment_information_fields .form-row { display: flex; flex-direction: column; gap: 14px; float: none; width: auto; margin: 0 0 14px; }
.account-content #pmpro_payment_information_fields .pmpro_checkout-field,
.account-content #pmpro_payment_information_fields [class*="col-"] { grid-area: auto; float: none; position: static; width: 100%; max-width: none; margin: 0; padding: 0; }
.account-content #pmpro_payment_information_fields label { display: block; position: static; margin-bottom: 6px; }
.account-content #pmpro_payment_information_fields .pmpro_checkout-fields-display-seal { display: block; }
.account-content #AccountNumber, .account-content #Expiry, .account-content #CVV,
.account-content .pmpro_checkout_gateway-stripe form.pmpro_form #pmpro_payment_information_fields div#AccountNumber,
.account-content .pmpro_checkout_gateway-stripe form.pmpro_form #pmpro_payment_information_fields div#Expiry,
.account-content .pmpro_checkout_gateway-stripe form.pmpro_form #pmpro_payment_information_fields div#CVV,
.account-content .pmpro_billing_gateway-stripe form.pmpro_form #pmpro_payment_information_fields div#AccountNumber,
.account-content .pmpro_billing_gateway-stripe form.pmpro_form #pmpro_payment_information_fields div#Expiry,
.account-content .pmpro_billing_gateway-stripe form.pmpro_form #pmpro_payment_information_fields div#CVV {
  min-height: 46px; padding: 13px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
}
.account-content #pmpro_payment_information_fields label small { font-size: 13px; font-weight: 600; }
.account-content #pmpro_payment_information_fields .acceptedPayments { color: var(--ink-2); font-size: 14px; }
.account-content #pmpro_payment_method h5, .account-content #pmpro_payment_information_fields h3 { margin: 8px 0 10px; font: 800 19px/1.3 var(--font-display); }
/* Payment method choice (PMPro prints radios with anchors as labels): one option card per gateway. */
.account-content #pmpro_payment_method .pmpro_checkout-fields { display: grid; gap: 8px; }
.account-content #pmpro_payment_method span[class^="gateway_"] {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
}
.account-content #pmpro_payment_method span[class^="gateway_"]:has(input:checked) { border-color: var(--blue); background: var(--sel); }
.account-content #pmpro_payment_method input[type="radio"] { width: 18px; height: 18px; margin: 0; flex: none; }
.account-content #pmpro_payment_method a.pmpro_radio { color: var(--ink); font-weight: 700; text-decoration: none; }
.account-content #pmpro_payment_information_fields img { display: block; float: none; max-width: 100%; height: auto; margin: 8px 0 14px; }
.pmpro_table, .account-content table {
  width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto;
  border: 0; background: transparent;
}
@media (min-width: 600px) { .pmpro_table, .account-content table { display: table; } }
.pmpro_table th, .pmpro_table td, .account-content table th, .account-content table td {
  padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; background: transparent;
}
.pmpro_table thead th, .account-content table thead th { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pmpro_invoice_details, .pmpro_invoice-details { display: grid; gap: 12px; }

/* Generic form controls inside plugin output */
.account-content form label { font-weight: 700; font-size: 14px; }
.account-content form p { margin-bottom: 14px; }
.account-content form .pmpro_checkout-field, .account-content form .pmpro_member_profile_edit-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.account-content form fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin: 0 0 16px; }
.account-content form legend { padding: 0 6px; font: 800 17px var(--font-display); }
.account-content input[type="submit"], .account-content button[type="submit"]:not(.btn), .account-content .pmpro_btn, .account-content .button,
.affwp-form input[type="submit"], .affwp-form .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px;
  border: 0; border-radius: var(--r); background: var(--blue); color: #fff;
  font: 800 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.account-content input[type="submit"]:hover, .account-content .pmpro_btn:hover, .affwp-form input[type="submit"]:hover { background: var(--blue-hover); color: #fff; }
.account-content .pmpro_btn-cancel, .account-content .pmpro_btn.pmpro_no { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.account-content input[type="button"]:not(.btn) { min-height: 44px; padding: 8px 16px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }

/* Parent-theme Bootstrap leftovers that can still appear in PMPro templates */
.account-content .form-control { width: 100%; }
.account-content .form-row, .account-content .row { display: grid; gap: 14px 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .account-content .form-row, .account-content .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.account-content .btn-success { background: var(--teal); color: var(--teal-dark); }
.account-content .text-danger { color: var(--red-ink); }
.account-content .text-success { color: var(--teal-ink); }
.account-content .text-primary { color: var(--link); }

/* AffiliateWP */
.affwp-form, #affwp-register-form, #affwp-login-form { display: flex; flex-direction: column; gap: 14px; }
.affwp-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.affwp-form legend { font: 800 22px var(--font-display); margin-bottom: 8px; }
.affwp-form p { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.affwp-form label { font-weight: 700; font-size: 14px; }
.affwp-form p.affwp-remember, .affwp-form .affwp-tos { flex-direction: row; align-items: center; gap: 10px; }
.affwp-errors, .affwp-notice { padding: 12px 14px; border-radius: var(--r); background: var(--red-wash); color: var(--red-ink); font-weight: 700; }
#affwp-affiliate-dashboard { display: flex; flex-direction: column; gap: 16px; }
#affwp-affiliate-dashboard-tabs { display: flex; gap: 4px; overflow-x: auto; list-style: none; margin: 0; padding: 3px; border-radius: var(--r); background: var(--chip); }
#affwp-affiliate-dashboard-tabs li { flex: none; }
#affwp-affiliate-dashboard-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 700; white-space: nowrap; }
#affwp-affiliate-dashboard-tabs li.active a { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 33, 45, 0.12); }
.affwp-table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.affwp-table th, .affwp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.affwp-affiliate-dashboard-url-generator input[type="text"], .affwp-referral-url { font-family: var(--font-mono); font-size: 14px; }
