/* Sitefy Marketplace — Auth Styles */

.smp-auth-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: #f0f4f7;
}

.smp-auth-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,51,78,.12);
}

/* Header */
.smp-auth-header {
  background: linear-gradient(135deg, #00263b 0%, #005f73 100%);
  padding: 32px 36px 28px;
  text-align: center;
}

.smp-auth-brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 16px;
}
.smp-auth-brand span { color: #16d6c7; }

.smp-auth-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -.02em;
}

.smp-auth-sub {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin: 0;
}

/* Body */
.smp-auth-body {
  padding: 28px 32px 32px;
}

/* Role Toggle */
.smp-role-toggle {
  display: flex;
  gap: 8px;
  background: #f0f4f7;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.smp-role-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #5a7a8a;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}

.smp-role-btn.smp-role-active {
  background: #fff;
  color: #00334e;
  box-shadow: 0 1px 6px rgba(0,51,78,.12);
}

/* Form elements */
.smp-auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.smp-form-group {
  margin-bottom: 16px;
}

.smp-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2a4a5a;
  margin-bottom: 6px;
}

.smp-form-input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: #1a3040;
  background: #f8fbfc;
  border: 1.5px solid #d0e0e8;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.smp-form-input:focus {
  border-color: #00b67a;
  box-shadow: 0 0 0 3px rgba(0,182,122,.12);
  background: #fff;
}
.smp-form-input[disabled] { opacity: .6; cursor: not-allowed; }

.smp-form-hint {
  display: block;
  font-size: 12px;
  color: #7a9aaa;
  margin-top: 4px;
}

.smp-form-optional {
  font-size: 11px;
  color: #9ab0bc;
  font-weight: 400;
}

/* Extras row */
.smp-auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
}

.smp-remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4a6a7a;
  cursor: pointer;
}

.smp-forgot-link {
  color: #005f73;
  text-decoration: none;
  font-weight: 600;
}
.smp-forgot-link:hover { color: #00b67a; }

/* Error */
.smp-auth-error {
  background: #fff0f0;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 16px;
}

.smp-auth-notice {
  background: #f0f9fc;
  border: 1px solid #b0d8e8;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 14px;
  color: #00334e;
  text-align: center;
}
.smp-auth-notice a { color: #00b67a; font-weight: 600; }

/* Block button */
.smp-btn-block {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 15px;
}

/* Switch */
.smp-auth-switch {
  text-align: center;
  font-size: 13px;
  color: #5a7a8a;
  margin-top: 20px;
  margin-bottom: 0;
}
.smp-auth-switch a {
  color: #00334e;
  font-weight: 700;
  text-decoration: none;
}
.smp-auth-switch a:hover { color: #00b67a; }

/* Theme override — force our styles inside auth and dashboard wrappers */
.smp-auth-page .smp-btn,
.smp-dash-wrap .smp-btn,
.smp-chat-layout .smp-btn,
.smp-modal .smp-btn {
  background: #00b67a;
  color: #fff !important;
  border: 2px solid #00b67a;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, box-shadow .15s;
  box-shadow: none;
}
.smp-auth-page .smp-btn:hover,
.smp-dash-wrap .smp-btn:hover,
.smp-modal .smp-btn:hover {
  background: #009f6a;
  border-color: #009f6a;
  color: #fff !important;
  text-decoration: none;
}
.smp-auth-page .smp-btn-ghost,
.smp-dash-wrap .smp-btn-ghost,
.smp-modal .smp-btn-ghost {
  background: transparent !important;
  border-color: #d0e0e8 !important;
  color: #2a4a5a !important;
}
.smp-auth-page .smp-btn-ghost:hover,
.smp-dash-wrap .smp-btn-ghost:hover,
.smp-modal .smp-btn-ghost:hover {
  background: #f0f4f7 !important;
}
.smp-auth-page .smp-role-btn,
.smp-auth-card .smp-role-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #5a7a8a !important;
  background: transparent !important;
  border: none !important;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: none !important;
  transition: background .18s, color .18s;
}
.smp-auth-page .smp-role-btn.smp-role-active,
.smp-auth-card .smp-role-btn.smp-role-active {
  background: #fff !important;
  color: #00334e !important;
  box-shadow: 0 1px 6px rgba(0,51,78,.12) !important;
}

/* Responsive */
@media (max-width: 520px) {
  .smp-auth-body { padding: 24px 20px 28px; }
  .smp-auth-header { padding: 24px 20px; }
  .smp-auth-grid-2 { grid-template-columns: 1fr; }
}

/* ===================================================
   MY ACCOUNT — LOGIN / REGISTER
   Wraps WooCommerce's own forms rather than replacing
   them, so existing integrations keep working.
   =================================================== */
.smp-auth {
  --smp-navy: #00334e;
  --smp-green: #00b67a;
  --smp-line: #dde8ec;
  --smp-ink: #14252f;
  --smp-muted: #5d7684;
  display: grid;
  grid-template-columns: 380px 1fr;
  max-width: 1020px;
  margin: 34px auto 48px;
  background: #fff;
  border: 1.5px solid #e2ecef;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 6px 40px rgba(0,51,78,.08);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--smp-ink);
}

/* Brand panel */
.smp-auth-aside {
  background: linear-gradient(150deg, #001e30 0%, #00334e 55%, #005f73 100%);
  color: #fff;
  padding: 46px 38px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.smp-auth-aside::after {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,214,199,.16) 0%, transparent 70%);
  pointer-events: none;
}
.smp-auth-aside-inner { position: relative; z-index: 1; }
.smp-auth-aside h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.smp-auth-aside p {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.72);
  margin: 0 0 26px;
}
.smp-auth-points { list-style: none; margin: 0; padding: 0; }
.smp-auth-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: rgba(255,255,255,.86);
  margin-bottom: 12px;
  line-height: 1.5;
}
.smp-auth-points li span {
  color: #4dffc4;
  font-weight: 800;
  flex-shrink: 0;
}

/* Form side */
.smp-auth-main { padding: 42px 44px; min-width: 0; }
.smp-auth-heading {
  font-size: 23px;
  font-weight: 800;
  color: var(--smp-navy);
  margin: 0 0 24px;
  letter-spacing: -.01em;
}

.smp-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f0f5f7;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}
.smp-auth-tab {
  appearance: none;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--smp-muted);
  padding: 11px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.smp-auth-tab:hover { color: var(--smp-navy); }
.smp-auth-tab.is-active {
  background: #fff;
  color: var(--smp-navy);
  box-shadow: 0 1px 4px rgba(0,51,78,.12);
}
.smp-auth-tab:focus-visible { outline: 2px solid var(--smp-green); outline-offset: 1px; }

/* Show only the active panel when both forms are present.
   OceanWP ships its own Login/Register switcher that keeps the register
   column hidden until its link is clicked, so the active panel has to be
   forced visible rather than merely un-hidden. */
.smp-auth-both .u-column1,
.smp-auth-both .u-column2 { width: 100%; float: none; margin: 0; padding: 0; }
.smp-auth-both[data-panel="login"]    .u-column1,
.smp-auth-both[data-panel="register"] .u-column2 { display: block !important; }
.smp-auth-both[data-panel="login"]    .u-column2,
.smp-auth-both[data-panel="register"] .u-column1 { display: none !important; }
/* WooCommerce prints an h2 above each column; the tabs replace it */
.smp-auth-both .u-column1 > h2,
.smp-auth-both .u-column2 > h2 { display: none; }
/* OceanWP renders its own Login/Register switcher, which duplicates the tabs. */
.smp-auth .owp-account-links,
.smp-auth .woocommerce-account-heading { display: none !important; }
.smp-auth .u-columns { display: block; margin: 0; }

/* WooCommerce form controls */
.smp-auth .woocommerce-form { border: none !important; padding: 0 !important; margin: 0 !important; }
.smp-auth .woocommerce-form-row { margin-bottom: 18px; padding: 0; }
.smp-auth label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--smp-navy);
  margin-bottom: 7px;
}
.smp-auth input[type="text"],
.smp-auth input[type="email"],
.smp-auth input[type="password"],
.smp-auth input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 13px 16px;
  border: 1.5px solid #c8d8de;
  border-radius: 11px;
  font-family: inherit;
  font-size: 15px;
  color: var(--smp-ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.smp-auth input:focus {
  outline: none;
  border-color: var(--smp-green);
  box-shadow: 0 0 0 3px rgba(0,182,122,.16);
}
.smp-auth .woocommerce-form__label-for-checkbox { font-weight: 500; font-size: 14px; color: var(--smp-muted); display: flex; gap: 9px; align-items: center; }
.smp-auth .woocommerce-form__input-checkbox { width: 18px; height: 18px; accent-color: var(--smp-green); margin: 0; }
.smp-auth .woocommerce-form-login__rememberme { margin: 4px 0 18px; }

.smp-auth button[type="submit"],
.smp-auth .woocommerce-button,
.smp-auth .woocommerce-form-login__submit,
.smp-auth .woocommerce-form-register__submit {
  width: 100%;
  min-height: 52px;
  background: var(--smp-green) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  margin: 4px 0 0;
  float: none;
}
.smp-auth button[type="submit"]:hover { background: #009f6a !important; box-shadow: 0 4px 20px rgba(0,182,122,.3); }
.smp-auth .lost_password { margin: 16px 0 0; font-size: 13.5px; text-align: center; }
.smp-auth .lost_password a { color: var(--smp-green); }
.smp-auth .woocommerce-privacy-policy-text p { font-size: 12.5px; color: #7d94a1; line-height: 1.6; margin: 16px 0 0; }

/* Role picker cards */
.smp-role-pick { border: none; margin: 4px 0 22px; padding: 0; }
.smp-role-pick legend {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--smp-navy);
  padding: 0;
  margin-bottom: 10px;
}
.smp-role-pick legend span { display: block; font-weight: 400; font-size: 12.5px; color: #7d94a1; margin-top: 2px; }
.smp-role-cards { display: grid; gap: 10px; }
.smp-role-card { display: block; cursor: pointer; margin: 0; }
.smp-role-card input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.smp-role-card-inner {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1.5px solid var(--smp-line);
  border-radius: 13px;
  padding: 14px 16px;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.smp-role-card:hover .smp-role-card-inner { border-color: #9fc4cf; }
.smp-role-card input:checked + .smp-role-card-inner {
  border-color: var(--smp-green);
  background: #f2fbf8;
  box-shadow: 0 0 0 3px rgba(0,182,122,.12);
}
.smp-role-card input:focus-visible + .smp-role-card-inner { outline: 2px solid var(--smp-green); outline-offset: 2px; }
.smp-role-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #eef5f7;
  color: var(--smp-navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.smp-role-card input:checked + .smp-role-card-inner .smp-role-ico { background: var(--smp-green); color: #fff; }
.smp-role-txt { flex: 1; font-size: 12.8px; color: var(--smp-muted); line-height: 1.5; }
.smp-role-txt strong { display: block; font-size: 14.5px; color: var(--smp-navy); margin-bottom: 1px; }
.smp-role-check {
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 2px solid #cddde3;
  flex-shrink: 0;
  position: relative;
  transition: border-color .15s, background .15s;
}
.smp-role-card input:checked + .smp-role-card-inner .smp-role-check {
  border-color: var(--smp-green);
  background: var(--smp-green);
}
.smp-role-card input:checked + .smp-role-card-inner .smp-role-check::after {
  content: '';
  position: absolute;
  left: 6px; top: 2.5px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.smp-role-err { font-size: 13px; color: #b42318; font-weight: 500; margin: 9px 0 0; }

@media (max-width: 880px) {
  .smp-auth { grid-template-columns: 1fr; margin: 18px auto 32px; border-radius: 18px; }
  .smp-auth-aside { padding: 32px 26px; }
  .smp-auth-aside h2 { font-size: 22px; }
  .smp-auth-points li:nth-child(n+3) { display: none; }
  .smp-auth-main { padding: 30px 24px; }
}

/* Password show/hide toggle.
   WooCommerce absolutely-positions this button inside .password-input, but it
   inherits a full-width button rule from the theme — so it stretched to the
   input's width and its eye glyph rendered dead-centre instead of at the edge.
   Pin it to a fixed icon-sized box on the right. */
.smp-auth .password-input {
  display: block;
  position: relative;
}
.smp-auth .password-input input[type="password"],
.smp-auth .password-input input[type="text"] {
  padding-right: 48px;
}
.smp-auth .show-password-input {
  position: absolute !important;
  top: 50% !important;
  right: 12px !important;
  left: auto !important;
  transform: translateY(-50%);
  width: 28px !important;
  height: 28px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #7d94a1;
  font-size: 15px;
  line-height: 1;
}
.smp-auth .show-password-input:hover { color: #00334e; background: #f0f5f7 !important; }
.smp-auth .show-password-input:focus-visible {
  outline: 2px solid #00b67a;
  outline-offset: 1px;
}
.smp-auth .show-password-input::after {
  margin: 0;
  line-height: 1;
}

/* ===================================================
   MOBILE PASS
   =================================================== */
@media (max-width: 600px) {
  .smp-auth { margin: 12px auto 28px; border-radius: 16px; }
  .smp-auth-aside { padding: 26px 20px; }
  .smp-auth-aside h2 { font-size: 20px; }
  .smp-auth-aside p { font-size: 14px; margin-bottom: 18px; }
  .smp-auth-main { padding: 26px 18px; }
  .smp-auth-tabs { margin-bottom: 22px; }
  .smp-auth-tab { font-size: 14px; padding: 12px 8px; }
  .smp-role-card-inner { padding: 12px 13px; gap: 11px; }
  .smp-role-ico { width: 36px; height: 36px; }
  .smp-role-txt strong { font-size: 14px; }
  .smp-role-txt { font-size: 12.3px; }
}

/* iOS zooms in when a focused field's text is under 16px. */
@media (max-width: 782px) and (pointer: coarse) {
  .smp-auth input[type="text"],
  .smp-auth input[type="email"],
  .smp-auth input[type="password"],
  .smp-auth input[type="tel"] { font-size: 16px; }
  .smp-auth button[type="submit"] { min-height: 50px; }
}

/* ===================================================
   WOOCOMMERCE TWO-COLUMN LAYOUT OVERRIDE
   With registration enabled, WooCommerce prints the login and register
   forms as a floated two-column set: `.woocommerce .col2-set .col-1
   { float: left; width: 48% }` — three classes, so it beats the
   single-class rules above. Our tabs show one form at a time, so the
   visible one was stuck at half width inside a leftover bordered box
   (this is what the staging site shows). Themes add their own border and
   padding to those columns too, which our card already provides.
   =================================================== */
.smp-auth .u-columns,
.smp-auth .col2-set,
.smp-auth .woocommerce .col2-set {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.smp-auth .u-column1,
.smp-auth .u-column2,
.smp-auth .col-1,
.smp-auth .col-2,
.smp-auth .woocommerce .col2-set .col-1,
.smp-auth .woocommerce .col2-set .col-2 {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.smp-auth form.woocommerce-form,
.smp-auth form.login,
.smp-auth form.register {
  width: 100% !important;
  max-width: none !important;
}
.smp-auth .smp-auth-main .woocommerce { width: 100%; max-width: none; }

/* Anti-spam plugins (wpcaptcha and similar) inject their challenge as bare
   text and an <img> directly into the form, with no row wrapper — so it
   inherits none of the field styling and sits flush against the input
   above it. Give the loose markup the same rhythm as a real field row. */
.smp-auth form.woocommerce-form > img,
.smp-auth form.login > img,
.smp-auth form.register > img { vertical-align: middle; margin: 0 6px; }
.smp-auth form.woocommerce-form > input[type="text"]:not(.input-text),
.smp-auth form.login > input[type="text"]:not(.input-text),
.smp-auth form.register > input[type="text"]:not(.input-text) {
  display: block;
  width: 100%;
  margin-top: 8px;
  margin-bottom: 18px;
}
