/**
 * @file registrationModal.css
 * @description Styles for the school registration / access-check modal in
 *              School Draw — shown while the app verifies that the signed-in
 *              user belongs to a registered school.
 *
 * CONTENTS
 * --------
 * 1. Dialog base (.sd-registration-dialog, ::backdrop)
 *    Native <dialog> with semi-transparent backdrop overlay.
 *    Slide-up + fade-in animation on open.
 *
 * 2. Header (.sd-registration-header, .sd-modal-icon, .sd-modal-title)
 *    School icon emoji, "Checking access…" / "Access Verified" heading,
 *    and optional subtitle with the user's email address.
 *
 * 3. Status states
 *    .sd-reg-checking — spinner animation while Firebase Cloud Function call
 *                       is in progress.
 *    .sd-reg-success  — green checkmark and "Welcome!" message.
 *    .sd-reg-error    — red X icon and error message with retry button.
 *    .sd-reg-blocked  — amber warning for unregistered schools with
 *                       a "Request access" link.
 *
 * 4. Spinner (.sd-spinner)
 *    CSS keyframe-animated circular spinner used during the access check.
 *
 * 5. Action buttons (.sd-btn, .sd-btn-primary, .sd-btn-secondary)
 *    Confirm / retry / logout button styling within the dialog.
 *
 * 6. Responsive overrides
 *    @media (max-width: 480px) — dialog fills most of screen width.
 *
 * RELATED JS FILE
 * ---------------
 * registrationChecker.js — calls Firebase Cloud Functions to verify school
 *                          registration and controls this dialog's visibility.
 */
.sd-registration-dialog {
  padding: 0;
  border: none;
  border-radius: 24px;
  background: #fff0;
  max-width: 520px;
  width: 90vw;
  overflow: visible;
}
.sd-registration-dialog::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(6px);
}
.sd-registration-header {
  background: linear-gradient(135deg, #3b82f6 0, #1d4ed8 50%, #1e40af 100%);
  padding: 32px 24px 24px;
  border-radius: 24px 24px 0 0;
  position: relative;
  color: #fff;
  text-align: center;
}
.sd-registration-header .sd-modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: inline-block;
  filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.1));
  animation: bounce 0.6s ease-in-out;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.sd-registration-header .sd-modal-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #fff;
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}
.sd-registration-header .sd-modal-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: rgb(255 255 255 / 0.95);
  margin: 0;
  line-height: 1.4;
}
.sd-registration-body {
  background: #f8f9fa;
  padding: 32px 24px;
  border-radius: 0 0 24px 24px;
}
.sd-registration-info {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  border: 2px solid #dbeafe;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.sd-info-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 4px;
}
.sd-info-content {
  flex: 1;
}
.sd-info-title {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}
.sd-info-text {
  font-size: 16px;
  color: #374151;
  margin: 0 0 12px 0;
  line-height: 1.5;
}
.sd-info-text strong {
  color: #1f2937;
  font-weight: 600;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
}
.sd-info-note {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  line-height: 1.4;
}
.sd-registration-actions {
  display: flex;
  justify-content: center;
}
.sd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  min-width: 160px;
}
.sd-btn-icon {
  font-size: 18px;
}
.sd-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0, #1d4ed8 100%);
  color: #fff;
  border: 2px solid #fff0;
}
.sd-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgb(59 130 246 / 0.3);
}
.sd-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgb(59 130 246 / 0.3);
}
.sd-btn:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}
.sd-btn.loading {
  position: relative;
  color: #fff0;
}
.sd-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid #fff0;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@media (max-width: 480px) {
  .sd-registration-dialog {
    width: 95vw;
    max-width: 100%;
  }
  .sd-registration-header {
    padding: 24px 20px 20px;
  }
  .sd-registration-header .sd-modal-title {
    font-size: 28px;
  }
  .sd-registration-header .sd-modal-subtitle {
    font-size: 16px;
  }
  .sd-registration-body {
    padding: 24px 20px;
  }
  .sd-registration-info {
    padding: 20px;
    flex-direction: column;
    text-align: center;
  }
  .sd-info-icon {
    margin-top: 0;
  }
  .sd-btn {
    width: 100%;
    padding: 18px 24px;
  }
}
@media (prefers-color-scheme: dark) {
  .sd-registration-body {
    background: #1f2937;
  }
  .sd-registration-info {
    background: #374151;
    border-color: #4b5563;
  }
  .sd-info-title {
    color: #f9fafb;
  }
  .sd-info-text {
    color: #d1d5db;
  }
  .sd-info-text strong {
    color: #f9fafb;
    background: #4b5563;
  }
  .sd-info-note {
    color: #9ca3af;
    border-color: #4b5563;
  }
}
