/* Me2You - Register page (auth/register.php)
   Moved from the page inline <style> block. Auth card, role selector,
   consent checks, password strength meter. Uses brand tokens. */

/* -- Auth card layout ----------------------------------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--ink-50, #FAF6EF);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--paper, #fff);
  border-radius: 20px;
  border: 1px solid var(--ink-200, #E7DFD5);
  box-shadow: 0 6px 18px rgba(46, 33, 22, 0.08);
  padding: 40px 32px 36px;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 32px 20px 28px;
    border-radius: 16px;
  }
}

/* -- Logo ----------------------------------------------- */
.auth-logo {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  object-fit: contain;
}

/* -- Heading -------------------------------------------- */
.auth-heading {
  font-family: 'Quicksand', 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink-900, #1F1A17);
  text-align: center;
  margin: 0 0 4px;
}

.auth-subtext {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: var(--ink-500, #6B5E55);
  text-align: center;
  margin: 0 0 28px;
}

/* -- Error banner --------------------------------------- */
.auth-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.4;
}

.auth-banner--error {
  background: var(--danger-100, #FCE2DD);
  color: #8C2A1F;
  border: 1px solid #F0C4BD;
}

.auth-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* -- Input groups --------------------------------------- */
.auth-field {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700, #3D342E);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-label .optional {
  font-weight: 400;
  text-transform: none;
  color: var(--ink-400, #948578);
  letter-spacing: 0;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400, #948578);
  pointer-events: none;
  display: flex;
}

.auth-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  color: var(--ink-900, #1F1A17);
  background: var(--ink-50, #FAF6EF);
  border: 1.5px solid var(--ink-300, #C9BEB3);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.auth-input-wrap input:focus {
  border-color: var(--brand-orange, #F89A1F);
  box-shadow: 0 0 0 3px rgba(248, 154, 31, 0.15);
  background: var(--paper, #fff);
}

.auth-input-wrap input::placeholder {
  color: var(--ink-400, #948578);
}

.auth-input-wrap input.is-invalid {
  border-color: var(--danger, #D44A3A);
}

.auth-input-wrap input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(212, 74, 58, 0.12);
}

.field-error {
  font-size: 13px;
  font-weight: 600;
  color: #8C2A1F;
  margin-top: 6px;
  padding-left: 2px;
}

/* -- Password toggle button ---------------------------- */
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  color: var(--ink-400, #948578);
  display: flex;
  align-items: center;
  border-radius: 8px;
  transition: color 0.15s ease;
}

.pw-toggle:hover {
  color: var(--ink-700, #3D342E);
}

.pw-toggle:focus-visible {
  outline: 2px solid var(--brand-orange, #F89A1F);
  outline-offset: 2px;
}

/* Password reveal icons: the "hide" icon starts hidden, then the toggle
   JS swaps inline display between the two. Replaces inline style="display:none". */
.pw-toggle .eye-closed {
  display: none;
}

/* -- Password strength meter ---------------------------- */
.pw-meter {
  margin-top: 8px;
}

.pw-meter-bar {
  height: 5px;
  border-radius: 3px;
  /* Track is transparent until the field has input, so an empty meter does
     not read as a stray divider under the password field. */
  background: transparent;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.pw-meter.is-active .pw-meter-bar {
  background: var(--ink-200, #E7DFD5);
}

.pw-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.pw-meter-label {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  transition: color 0.25s ease;
}

/* -- Role selector cards -------------------------------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.role-card {
  position: relative;
}

.role-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px 14px;
  background: var(--ink-50, #FAF6EF);
  border: 2px solid var(--ink-200, #E7DFD5);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.role-card label:hover {
  border-color: var(--ink-300, #C9BEB3);
  background: var(--paper, #fff);
}

.role-card input:checked + label {
  border-color: var(--brand-orange, #F89A1F);
  background: var(--brand-orange-50, #FFF6E9);
  box-shadow: 0 0 0 3px rgba(248, 154, 31, 0.12);
}

.role-card input:focus-visible + label {
  outline: 2px solid var(--brand-orange, #F89A1F);
  outline-offset: 2px;
}

.role-card .role-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ink-200, #E7DFD5);
  color: var(--ink-500, #6B5E55);
  transition: background 0.15s ease, color 0.15s ease;
}

.role-card input:checked + label .role-icon {
  background: var(--brand-orange, #F89A1F);
  color: #fff;
}

.role-card .role-name {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-700, #3D342E);
}

.role-card .role-desc {
  font-size: 11px;
  color: var(--ink-400, #948578);
  line-height: 1.3;
}

@media (max-width: 360px) {
  .role-grid {
    grid-template-columns: 1fr;
  }
  .role-card label {
    flex-direction: row;
    gap: 12px;
    padding: 12px 16px;
    text-align: left;
  }
}

/* -- Consent checkboxes --------------------------------- */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--ink-700, #3D342E);
  line-height: 1.4;
}

.auth-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-orange, #F89A1F);
  border-radius: 4px;
  cursor: pointer;
}

.auth-check a {
  font-weight: 700;
  color: var(--brand-orange-700, #C76B0F);
}

.auth-check a:hover {
  color: var(--brand-orange, #F89A1F);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.auth-check .check-error {
  font-size: 13px;
  font-weight: 600;
  color: #8C2A1F;
  display: block;
  margin-top: 2px;
}

/* -- Submit button -------------------------------------- */
.auth-btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 24px;
  font-family: 'Quicksand', 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--brand-orange, #F89A1F);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  letter-spacing: 0.01em;
}

.auth-btn:hover {
  background: var(--brand-orange-600, #E8851A);
  box-shadow: 0 4px 14px rgba(248, 154, 31, 0.35);
}

.auth-btn:active {
  transform: scale(0.98);
  background: var(--brand-orange-700, #C76B0F);
}

.auth-btn:focus-visible {
  outline: 2px solid var(--brand-orange-700, #C76B0F);
  outline-offset: 2px;
}

/* -- Footer link ---------------------------------------- */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--ink-500, #6B5E55);
  margin: 20px 0 0;
}

.auth-footer a {
  font-weight: 700;
  color: var(--brand-orange-700, #C76B0F);
}

.auth-footer a:hover {
  color: var(--brand-orange, #F89A1F);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* -- Form hint text ------------------------------------- */
.auth-hint {
  font-size: 12px;
  color: var(--ink-400, #948578);
  margin-top: 6px;
  padding-left: 2px;
}

/* -- Static positional tweaks (moved from inline style=) -- */
.auth-label--plan {
  margin-bottom: 10px;
}
.auth-hint--plan {
  margin-top: -4px;
  margin-bottom: 10px;
}
.auth-hint--driver {
  margin-top: -12px;
  margin-bottom: 16px;
}

/* "Other" city free-text input: hidden until the city picker selects
   "Other", at which point pickers.js sets an inline display that
   overrides this. Replaces inline style="display:none". */
.auth-other-input {
  display: none;
}
