/*!
 * SBA Inquiry Modal — supplemental CSS.
 *
 * Deployed to: /wp-content/themes/generatepress/inquiry-modal.css
 * Loaded by:   GP Element 643 via <link rel="stylesheet" href="...">
 *
 * Visual styling lives in Global Style classes (school-dialog*, school-form-*).
 * This file contains only what Global Styles can't express cleanly:
 *  - Fade/scale entrance transition on the dialog panel
 *  - backdrop-filter blur (vendor-prefix juggling)
 *  - Off-screen positioning for the honeypot field
 *  - 2-column row layout for paired form fields (CSS grid)
 *  - Hide-on-print
 *  - Container-level state rules (.school-dialog[hidden], aria-busy, etc.)
 */

/* Modal visibility — hidden attribute is the source of truth */
.school-dialog[hidden] {
  display: none !important;
}
.school-dialog {
  display: flex;
}

/* Lock scroll behind modal */
.school-dialog,
.school-dialog__backdrop {
  -webkit-overflow-scrolling: touch;
}

/* Backdrop blur (best-effort; degrades gracefully) */
.school-dialog__backdrop {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Subtle entrance — fade backdrop + scale-up panel */
.school-dialog__backdrop {
  animation: sba-dialog-fade 180ms ease-out;
}
.school-dialog__panel {
  animation: sba-dialog-rise 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sba-dialog-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sba-dialog-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .school-dialog__backdrop,
  .school-dialog__panel {
    animation: none;
  }
}

/* 2-up rows on ≥600px; stack at <600px. Matches the iframe form's layout. */
.sba-row {
  display: grid;
  gap: 1rem;
}
.sba-row--1 { grid-template-columns: minmax(0, 1fr); }
.sba-row--2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) {
  .sba-row--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Honeypot — off-screen, not display:none (some bots skip display:none fields) */
.sba-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Form is busy: dim + non-interactive */
#sba-inquiry-form[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

/* Status container (success / fatal) reuses dialog padding */
.sba-inquiry-success,
.sba-inquiry-fatal {
  text-align: center;
  padding: 1rem 0;
}
.sba-inquiry-success h3,
.sba-inquiry-fatal p {
  margin-top: 0;
}
.sba-inquiry-ref {
  margin-top: 1rem;
  color: rgba(0, 0, 0, 0.55);
}

.sba-inquiry-fatal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

/* Don't print the modal */
@media print {
  .school-dialog { display: none !important; }
}
