@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* ==========================================================
   REGISTRATION CONTENT ONLY
========================================================== */

.rider-register__view {
  --register-header-height: 80px;
  --ink: #152739;
  --muted: #506276;
  --navy: #0c2332;
  --green: #087653;
  --green-hover: #065d42;
  --mint: #e8f5ef;
  --border: #d9e2e9;
  --paper: #ffffff;
  --red: #ad2736;
  --radius: 18px;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --font-heading: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;

  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 1080px;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0 auto;
  padding: 32px 20px;

  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color-scheme: light;
}

.rider-register__view *,
.rider-register__view *::before,
.rider-register__view *::after {
  box-sizing: border-box;
}

.rider-register__view [hidden] {
  display: none !important;
}

.rider-register__view ::selection {
  background: #b9e6d4;
  color: #153f35;
}

.rider-register__view button,
.rider-register__view input,
.rider-register__view select,
.rider-register__view textarea {
  font: inherit;
}

.rider-register__view button,
.rider-register__view a {
  -webkit-tap-highlight-color: transparent;
}

.rider-register__view button {
  cursor: pointer;
}

.rider-register__view button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rider-register__view a {
  color: var(--green);
  text-decoration: none;
  text-underline-offset: 3px;
}

.rider-register__view a:hover {
  color: var(--green-hover);
  text-decoration: underline;
}

.rider-register__view :focus-visible {
  outline: 3px solid #edaa39;
  outline-offset: 3px;
}

.rider-register__view img {
  display: block;
  max-width: 100%;
}

.rider-register__view p {
  margin: 0;
}

.rider-register__view .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================
   COMPACT REGISTRATION CARD
========================================================== */

.rider-register__view .auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;

  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0 auto;

  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 8px 28px rgba(22, 49, 67, 0.05),
    0 1px 4px rgba(22, 49, 67, 0.03);
}

.rider-register__view .auth-panel,
.rider-register__view .rider-register__main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;

  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 26px 30px;
}

.rider-register__view .auth-copy {
  flex: none;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
}

/* ==========================================================
   HEADING
========================================================== */

.rider-register__view h1,
.rider-register__view h2,
.rider-register__view h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.rider-register__view .auth-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.rider-register__view .auth-copy .subhead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ==========================================================
   EMAIL / PHONE TABS
========================================================== */

.rider-register__view .register-methods {
  display: flex;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.rider-register__view .register-methods__tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 9px 14px;

  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: #405466;

  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.rider-register__view .register-methods__tab:hover:not(:disabled) {
  background: #f4faf7;
  border-color: #a9cabb;
}

.rider-register__view .register-methods__tab[aria-selected="true"] {
  border-color: var(--green);
  background: var(--mint);
  color: #086144;
  font-weight: 700;
}

/* ==========================================================
   FORM
========================================================== */

.rider-register__view .form-stack,
.rider-register__view .auth-copy .form-stack {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.rider-register__view .register-fields,
.rider-register__view [role="tabpanel"] {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.rider-register__view .form-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;

  color: #293e52;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.rider-register__view .form-field > span {
  display: block;
  overflow-wrap: anywhere;
}

.rider-register__view .form-field input,
.rider-register__view .form-field select,
.rider-register__view .form-field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;

  border: 1px solid #aebec9;
  border-radius: 9px;
  background: #fff;
  color: #1c3042;

  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.rider-register__view .form-field select {
  cursor: pointer;
}

.rider-register__view .form-field textarea {
  min-height: 96px;
  resize: vertical;
}

.rider-register__view .form-field input::placeholder,
.rider-register__view .form-field textarea::placeholder {
  color: #738292;
  opacity: 1;
}

.rider-register__view .form-field input:focus,
.rider-register__view .form-field select:focus,
.rider-register__view .form-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 118, 83, 0.13);
}

.rider-register__view .form-field input[aria-invalid="true"],
.rider-register__view .form-field select[aria-invalid="true"] {
  border-color: var(--red);
}

.rider-register__view .form-field input:disabled,
.rider-register__view .form-field select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ==========================================================
   BUTTONS
========================================================== */

.rider-register__view .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-width: 0;
  min-height: 44px;
  padding: 11px 16px;

  border: 1px solid transparent;
  border-radius: 9px;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: normal;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.rider-register__view .btn:hover {
  text-decoration: none;
}

.rider-register__view .btn-primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.rider-register__view .btn-primary:hover:not(:disabled) {
  border-color: var(--green-hover);
  background: var(--green-hover);
  color: #fff;
}

.rider-register__view .form-stack > .btn,
.rider-register__view .auth-copy .form-stack > .btn,
.rider-register__view #register-submit {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
}

.rider-register__view .btn-outline {
  border-color: #86aa9b;
  background: #fff;
  color: var(--green);
}

.rider-register__view .btn-soft {
  border-color: #d1e6da;
  background: #e7f2ec;
  color: #155940;
}

.rider-register__view .btn-danger {
  border-color: #f1c8ce;
  background: #fff0f1;
  color: #962331;
}

/* ==========================================================
   FEEDBACK AND SUPPORTING TEXT
========================================================== */

.rider-register__view .register-message {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rider-register__view .register-message[data-type="success"] {
  color: #166534;
}

.rider-register__view .register-message[data-type="info"] {
  color: var(--muted);
}

.rider-register__view .help-links {
  margin: 14px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.rider-register__view .help-links a {
  display: inline-block;
  font-weight: 700;
}

.rider-register__view .auth-panel > .small-note {
  width: 100%;
  max-width: 420px;
  margin: 14px auto 0;
  padding: 0;
  color: #607084;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

/* ==========================================================
   IMAGE PANEL
========================================================== */

.rider-register__view .auth-visual {
  position: relative;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  overflow: hidden;

  border-radius:
    0
    calc(var(--radius) - 1px)
    calc(var(--radius) - 1px)
    0;
  background: #16484a;
}

.rider-register__view .auth-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.rider-register__view .auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    0deg,
    rgba(0, 25, 31, 0.82) 0%,
    rgba(0, 25, 31, 0.28) 40%,
    transparent 70%
  );
}

.rider-register__view .photo-caption {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 1;

  display: grid;
  gap: 6px;
  min-width: 0;
  color: #fff;
}

.rider-register__view .photo-caption strong {
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.rider-register__view .photo-caption span {
  color: #f0f7f4;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

/* ==========================================================
   CONFIRMATION MODAL
========================================================== */

.rider-register__view .register-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
}

.rider-register__view .register-modal__panel {
  width: 100%;
  max-width: 400px;
  min-width: 0;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;

  padding: 24px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.rider-register__view .register-modal__panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

.rider-register__view .register-modal__value {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rider-register__view .register-modal__actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rider-register__view .register-modal__actions .btn {
  width: 100%;
}

.rider-register__view .register-edit-button {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.15s ease;
}

.rider-register__view .register-edit-button:hover:not(:disabled) {
  background: #f3f4f6;
}

/* ==========================================================
   DESKTOP CENTERING
   Match the header offset to the actual header height.
========================================================== */

@media (min-width: 851px) {
  .rider-register__view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    min-height: calc(100vh - var(--register-header-height));
    min-height: calc(100dvh - var(--register-header-height));
    padding: 32px 20px;
  }

  .rider-register__view .auth-grid {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
  }
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 850px) {
  .rider-register__view {
    max-width: 540px;
    padding: 32px 16px 28px;
  }

  .rider-register__view .auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rider-register__view .auth-panel,
  .rider-register__view .rider-register__main {
    min-height: 0;
    padding: 24px;
  }

  .rider-register__view .auth-copy {
    max-width: none;
  }

  .rider-register__view .auth-visual {
    display: none;
  }

  .rider-register__view .auth-copy h1 {
    font-size: 29px;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 480px) {
  .rider-register__view {
    padding: 26px 12px 24px;
  }

  .rider-register__view .auth-grid {
    border-radius: 14px;
  }

  .rider-register__view .auth-panel,
  .rider-register__view .rider-register__main {
    padding: 20px 18px;
  }

  .rider-register__view .auth-copy h1 {
    margin-bottom: 7px;
    font-size: 27px;
  }

  .rider-register__view .auth-copy .subhead {
    margin-bottom: 14px;
    font-size: 13px;
  }

  .rider-register__view .register-methods {
    margin-bottom: 14px;
  }

  .rider-register__view .help-links {
    margin-top: 12px;
  }

  .rider-register__view .auth-panel > .small-note {
    margin-top: 12px;
    font-size: 11px;
  }

  .rider-register__view .register-modal__panel {
    padding: 20px;
  }
}

/* ==========================================================
   SHORT LAPTOP SCREENS
========================================================== */

@media (max-height: 700px) and (min-width: 851px) {
  .rider-register__view {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .rider-register__view .auth-panel,
  .rider-register__view .rider-register__main {
    padding: 20px 26px;
  }

  .rider-register__view .auth-copy h1 {
    font-size: 29px;
  }

  .rider-register__view .auth-copy .subhead,
  .rider-register__view .register-methods {
    margin-bottom: 12px;
  }

  .rider-register__view .form-stack,
  .rider-register__view .auth-copy .form-stack,
  .rider-register__view .register-fields,
  .rider-register__view [role="tabpanel"] {
    gap: 10px;
  }

  .rider-register__view .help-links,
  .rider-register__view .auth-panel > .small-note {
    margin-top: 10px;
  }
}

/* ==========================================================
   ACCESSIBILITY AND PRINT
========================================================== */

@media (prefers-reduced-motion: reduce) {
  .rider-register__view *,
  .rider-register__view *::before,
  .rider-register__view *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .rider-register__view {
    display: block;
    max-width: none;
    min-height: 0;
    padding: 0;
  }

  .rider-register__view .auth-grid {
    grid-template-columns: minmax(0, 1fr);
    border: 0;
    box-shadow: none;
  }

  .rider-register__view .auth-visual,
  .rider-register__view .register-modal {
    display: none !important;
  }
}