/* ==========================================================================
   MAKE ANEW ELECTRONICS - FORMS & AUTH STYLESHEET
   Refined, accessible, and responsive form components
   ========================================================================== */

.auth-wrapper {
  padding: 4rem 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  background-color: var(--surface);
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 440px;
  padding: 2.25rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.auth-header p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

/* Form Container Card */
.form-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

@media (max-width: 640px) {
  .form-card {
    padding: 1.5rem 1.25rem;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.925rem;
  line-height: 1.5;
  color: var(--foreground);
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: #64748b;
  font-size: 0.88rem;
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: #64748b;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background-color: #ffffff;
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled,
button:disabled {
  color: #64748b;
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  opacity: 1;
  cursor: not-allowed;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

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

@media (min-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-hint {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  margin-top: 0.35rem;
}

.alert-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  display: none;
  line-height: 1.5;
}

.alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.booking-wizard h3 {
  font-family: var(--font-display);
  color: var(--foreground);
  font-size: 1.25rem;
  margin-bottom: .5rem;
}

.booking-wizard-actions,
.booking-location-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.location-search-group {
  position: relative;
}

.location-suggestions {
  position: absolute;
  z-index: 20;
  top: 100%;
  right: 0;
  left: 0;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.location-suggestion {
  display: block;
  width: 100%;
  padding: .75rem .9rem;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--foreground);
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.location-suggestion:last-child {
  border-bottom: 0;
}

.location-suggestion:hover,
.location-suggestion:focus-visible {
  outline: 0;
  background: var(--surface);
}

.booking-wizard-actions .btn {
  flex: 1 1 12rem;
}

.location-map-wrap {
  position: relative;
  margin: 1rem 0 0;
}

.location-map {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.location-map-confirm {
  height: 280px;
}

.location-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-foreground);
  font-size: .85rem;
  font-weight: 600;
}

.location-map-loading[hidden] {
  display: none;
}

.location-map-notice {
  margin-top: .65rem;
  padding: .7rem .9rem;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  background: #fffbeb;
  color: #92400e;
  font-size: .82rem;
  line-height: 1.5;
}

.location-status {
  margin-top: .65rem;
}

.location-status.location-loading {
  color: var(--muted-foreground);
  font-weight: 600;
}

.location-valid {
  color: var(--primary-deep);
  font-weight: 700;
}

.location-invalid {
  color: var(--destructive);
  font-weight: 700;
}

.location-confirm-card {
  display: grid;
  gap: .3rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.location-confirm-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-deep);
}

.location-confirm-address {
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.55;
  word-break: break-word;
}

.location-confirm-meta {
  font-size: .85rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.booking-review {
  display: grid;
  gap: .65rem;
  margin: 1rem 0 1.25rem;
}

.booking-review-row {
  display: grid;
  grid-template-columns: minmax(7rem, .35fr) 1fr;
  gap: 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--hairline);
}

.booking-review-row span {
  color: var(--muted-foreground);
}

.booking-charge {
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  background: var(--primary-light);
}

.booking-charge strong {
  color: var(--primary-deep);
}

.booking-charge span {
  color: var(--muted-foreground);
  font-size: .85rem;
}

.booking-success {
  padding: 2rem 1rem;
  text-align: center;
}

.booking-success h3 {
  margin-bottom: .5rem;
}

.booking-success p {
  max-width: 44ch;
  margin: 0 auto 1rem;
  color: var(--muted-foreground);
}

@media (max-width: 520px) {
  .booking-review-row {
    grid-template-columns: 1fr;
    gap: .15rem;
  }

  .booking-location-actions .btn {
    width: 100%;
  }

  .location-map,
  .location-map-confirm {
    height: 260px;
  }
}
