/* ================================================================
   Premier Sports Academy — Shared modal + form styling used by the
   "Start a Team" and "Bring a Team" forms on baseball and softball
   sides. Pulls the page's --baby-blue accent so each sport keeps its
   own color without duplicating styles.
   ================================================================ */

/* Backdrop */
.fm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 2rem;
  overflow-y: auto;
}

.fm-overlay.open {
  display: flex;
}

/* Modal container */
.fm-modal {
  background: #0a1628;
  border: 1px solid rgba(77, 168, 218, 0.22);
  border-radius: 8px;
  max-width: 620px;
  width: 100%;
  padding: 2.5rem 2rem 2rem;
  position: relative;
  color: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  margin: 0 auto;
}

/* Close button */
.fm-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.fm-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Heading */
.fm-modal h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  padding-right: 2.5rem;
}

.fm-subtitle {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 1.75rem 0;
}

/* Fields */
.fm-field {
  margin-bottom: 1.1rem;
}

.fm-field label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 0.45rem;
}

.fm-field input[type="text"],
.fm-field input[type="email"],
.fm-field input[type="tel"],
.fm-field input[type="number"],
.fm-field select,
.fm-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 0.72rem 0.85rem;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.fm-field input:focus,
.fm-field select:focus,
.fm-field textarea:focus {
  outline: none;
  border-color: var(--baby-blue, #4da8da);
  background: rgba(255, 255, 255, 0.07);
}

.fm-field textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.fm-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.7) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.7) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.fm-field select option {
  background: #0a1628;
  color: #ffffff;
}

/* Radio group */
.fm-radio-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.fm-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}
.fm-radio-group input[type="radio"] {
  accent-color: var(--baby-blue, #4da8da);
  width: 18px;
  height: 18px;
}

/* Hidden honeypot - not visible to users */
.fm-hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

/* Submit button */
.fm-submit {
  background: var(--baby-blue, #4da8da);
  color: #ffffff;
  border: none;
  padding: 0.95rem 1.5rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  margin-top: 0.5rem;
  transition: opacity 0.25s, transform 0.15s;
}
.fm-submit:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}
.fm-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Status message */
.fm-status {
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.4;
  display: none;
}
.fm-status.fm-success {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #86efac;
  display: block;
}
.fm-status.fm-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  display: block;
}

/* Lock body scroll when modal is open */
body.fm-open {
  overflow: hidden;
}

/* Tight phone tweaks */
@media (max-width: 540px) {
  .fm-overlay { padding: 3rem 0.75rem 2rem; }
  .fm-modal { padding: 2rem 1.25rem 1.5rem; }
  .fm-modal h2 { font-size: 1.3rem; }
}
