/* ==========================================================================
   FOXSECUR INQUIRIES — "Submit Request" modal
   Matches Figma node 391:4636 ("Modal Body") + 391:4635 (backdrop overlay).
   Brand tokens (navy/gold, Kumbh Sans) reuse the theme's CSS custom
   properties where the Figma value coincides with them (the submit button
   and its text are literally var(--color-yellow)/var(--color-navy)); the
   modal's own light neutral surface colors (bg/input/label/heading-on-light)
   are the exact values from the Figma file, since the theme has no existing
   light-modal surface to reuse instead.
   Table of contents:
   1. Overlay / backdrop
   2. Modal shell
   3. Header + close button
   4. Form fields
   5. Footer / actions
   6. Responsive (tablet + mobile)
   ========================================================================== */

/* 1. Overlay / backdrop
   ========================================================================== */
.fsi-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.fsi-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
body.fsi-modal-open {
  overflow: hidden;
}

/* 2. Modal shell
   ========================================================================== */
.fsi-modal {
  background: #f2f4f6;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(25, 28, 30, 0.16);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}
.fsi-modal-overlay.is-open .fsi-modal {
  transform: translateY(0) scale(1);
}

/* 3. Header + close button
   ========================================================================== */
.fsi-modal__header {
  position: relative;
  padding: 40px 40px 0;
}
.fsi-modal__title {
  font-family: var(--font-heading, 'Kumbh Sans', sans-serif);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #191c1e;
  margin: 0;
  padding-right: 32px;
}
.fsi-modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #424752;
  background: transparent;
  border-radius: 50%;
  transition: background-color 0.15s ease;
}
.fsi-modal__close:hover,
.fsi-modal__close:focus-visible {
  background: rgba(66, 71, 82, 0.08);
}
.fsi-modal__close svg {
  width: 14px;
  height: 14px;
}

/* 4. Form fields
   ========================================================================== */
.fsi-modal__form {
  padding: 24px 40px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 20px;
}
.fsi-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fsi-field--full { grid-column: 1 / -1; }
.fsi-field--half { grid-column: span 1; }

.fsi-field label {
  font-family: var(--font-alt, 'Inter', sans-serif);
  font-weight: 500;
  font-size: 12px;
  color: #424752;
  padding-left: 3px;
}

.fsi-input {
  background: #e6e8ea;
  border: 1px solid transparent;
  border-radius: 6px;
  height: 42px;
  padding: 12px 14px;
  font-family: var(--font-alt, 'Inter', sans-serif);
  font-size: 14px;
  color: #191c1e;
  width: 100%;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.fsi-input::placeholder { color: rgba(114, 119, 131, 0.6); }
.fsi-input:focus {
  outline: none;
  border-color: var(--color-navy, #232d64);
  background: #fff;
}
.fsi-input.is-invalid {
  border-color: #d64545;
  background: #fdf0f0;
}

.fsi-textarea {
  height: auto;
  min-height: 112px;
  padding-top: 14px;
  resize: vertical;
  font-family: var(--font-alt, 'Inter', sans-serif);
  line-height: 1.5;
}

.fsi-input-icon { position: relative; }
.fsi-input-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 17px;
  color: #424752;
  pointer-events: none;
}
.fsi-input-icon .fsi-input { padding-left: 41px; }

.fsi-field__error {
  display: none;
  font-family: var(--font-alt, 'Inter', sans-serif);
  font-size: 12px;
  color: #d64545;
  padding-left: 3px;
}
.fsi-field.has-error .fsi-field__error { display: block; }
.fsi-field.has-error label { color: #d64545; }

.fsi-modal__status {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-alt, 'Inter', sans-serif);
  font-size: 14px;
  min-height: 0;
}
.fsi-modal__status.is-success { color: #1a7f37; }
.fsi-modal__status.is-error { color: #d64545; }

/* 5. Footer / actions
   ========================================================================== */
.fsi-modal__footer {
  grid-column: 1 / -1;
  background: rgba(236, 238, 240, 0.5);
  margin: 8px -40px -32px;
  padding: 24px 40px 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.fsi-btn-cancel {
  font-family: 'Manrope', var(--font-body, sans-serif);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-navy, #232d64);
  background: transparent;
  padding: 8px;
}
.fsi-btn-cancel:hover { text-decoration: underline; }

.fsi-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--color-yellow, #eab21d);
  color: var(--color-navy, #232d64);
  font-family: 'Manrope', var(--font-body, sans-serif);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 9px 13px -3px rgba(0, 71, 141, 0.2), 0 3px 5px -3px rgba(0, 71, 141, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.fsi-btn-submit svg { width: 12px; height: 12px; flex: none; }
.fsi-btn-submit:hover { transform: translateY(-1px); }
.fsi-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 6. Responsive (tablet + mobile)
   ========================================================================== */
@media (max-width: 900px) {
  .fsi-modal__header { padding: 32px 28px 0; }
  .fsi-modal__form { padding: 20px 28px 28px; gap: 16px 16px; }
  .fsi-modal__footer { margin: 8px -28px -28px; padding: 20px 28px 28px; }
}

@media (max-width: 600px) {
  .fsi-modal-overlay { padding: 0; align-items: flex-end; }
  .fsi-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }
  .fsi-modal__header { padding: 24px 20px 0; }
  .fsi-modal__title { font-size: 22px; }
  .fsi-modal__close { top: 16px; right: 16px; }
  .fsi-modal__form {
    grid-template-columns: 1fr;
    padding: 16px 20px 24px;
    gap: 14px;
  }
  .fsi-field--half { grid-column: 1 / -1; }
  .fsi-modal__footer {
    margin: 8px -20px -24px;
    padding: 16px 20px 24px;
    flex-direction: column-reverse;
    gap: 12px;
  }
  .fsi-btn-cancel,
  .fsi-btn-submit {
    width: 100%;
    justify-content: center;
  }
  .fsi-btn-cancel { padding: 12px; text-align: center; }
}
