/**
 * Bespoke lightweight modal for the anonymous check-in flow - no existing
 * modal pattern in mosque_directory's public side to match (the admin-side
 * Drupal Ajax-dialog convention is overkill for a two-step client-side
 * flow), so this is plain CSS/JS. Accent color matches the site's existing
 * primary teal (see .mosque-hero-action-btn--primary in mosque-directory.css).
 */
.mosque-checkin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 20, 0.6);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mosque-checkin-overlay.is-open {
  display: flex;
}

.mosque-checkin-dialog {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.mosque-checkin-dialog h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgb(15, 118, 110);
  margin-bottom: 4px;
}

.mosque-checkin-dialog .mosque-checkin-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 16px;
}

.mosque-checkin-field {
  margin-bottom: 14px;
}

.mosque-checkin-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #374151;
}

.mosque-checkin-field input[type="text"],
.mosque-checkin-field input[type="tel"],
.mosque-checkin-field input[type="number"],
.mosque-checkin-field input[type="datetime-local"],
.mosque-checkin-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
}

.mosque-checkin-field textarea {
  resize: vertical;
  min-height: 60px;
}

.mosque-checkin-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #4b5563;
  margin-bottom: 16px;
}

.mosque-checkin-consent input {
  margin-top: 3px;
}

.mosque-checkin-error {
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: none;
}

.mosque-checkin-error.is-visible {
  display: block;
}

.mosque-checkin-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.mosque-checkin-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.mosque-checkin-btn--primary {
  background: linear-gradient(135deg, rgb(13, 148, 136), rgb(15, 118, 110));
  color: #fff;
}

.mosque-checkin-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mosque-checkin-btn--secondary {
  background: #f3f4f6;
  color: #374151;
}

.mosque-checkin-otp-input {
  width: 100%;
  text-align: center;
  font-size: 1.8rem;
  letter-spacing: 0.5rem;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 14px;
}

.mosque-checkin-resend-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 10px;
}
