/* =========================================================
   GLOBAL FORM CSS (uses your Global CSS variables)
   File: /assets/css/global/global_form.css
   NOTE: This assumes your GLOBAL CSS is already loaded.
   ========================================================= */

/* SECTION BG: image + blue overlay */
.fladco-form{
  position: relative;
  color: var(--gc-white);
  padding: var(--space-xl) 0;
  background:
    linear-gradient(0deg, rgba(3, 46, 74, 0.92), rgba(3, 46, 74, 0.92)),
    var(--fladco-bg-image) center / cover no-repeat;
}

/* Grid */
.fladco-form-grid{
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-lg);
  align-items: start;
}

/* Cards */
.fladco-form-col-inner{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.fladco-form h2{

  line-height: 1.1;
  margin: 0 0 var(--space-sm);
}

.fladco-form h3{
  margin: var(--space-md) 0 var(--space-sm);
}

/* Subheading */
.subheading-highlight{
  margin: 0 0 var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.12);
}
.subheading-highlight p{
  margin: 0;
  color: rgba(255,255,255,0.92);
}

/* Features */
.fladco-form-features{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.fladco-form-features li{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.fladco-form-features i{
  margin-top: 2px;
  min-width: 18px;
}
.fladco-form-features span{
  color: rgba(255,255,255,0.92);
}

/* Form card white */
.fladco-form-col-form .fladco-form-col-inner{
  background: var(--gc-white);
  color: var(--gc-text);
  border-color: rgba(0,0,0,0.10);
}

.promo-headline{
  margin: 0 0 var(--space-sm);
  color: var(--gc-dark-blue);
}

#fladcowrap{ display: grid; gap: var(--space-sm); }

/* Rows */
.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}
.form-group{ display: grid; gap: 6px; }

.form-group label{
  font-weight: 700;
  color: rgba(11,18,32,0.92);
}

.form-group input{
  width: 100%;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  outline: none;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.form-group input::placeholder{
  color: rgba(11,18,32,0.45);
}

.form-group input:focus{
  border-color: var(--gc-light-blue);
  box-shadow: 0 0 0 4px rgba(0,145,235,0.15);
}

.form-group input[readonly]{
  background: rgba(0,0,0,0.04);
}

/* Optional: nicer invalid feel when your JS shows error text */
.form-group input.is-invalid{
  border-color: rgba(180,35,24,0.55);
  box-shadow: 0 0 0 4px rgba(180,35,24,0.12);
}

/* Suggestions */
.form-group-relative{ position: relative; }

.email-suggestions{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  box-shadow: var(--shadow-md);
}
.email-suggestions.is-open{ display: block; }
.email-suggestions ul{ list-style: none; margin: 0; padding: 0; }
.email-suggestions li{
  padding: 10px 12px;
  cursor: pointer;
  
}
.email-suggestions li:hover,
.email-suggestions li.is-active{
  background: rgba(0,145,235,0.08);
}

/* Error messages */
.error-message{
  color: #b42318;
  min-height: 1.05em;
}

/* Disclaimer */
.form-disclaimer{
  margin: var(--space-xs) 0 0;
  color: rgba(11,18,32,0.72);
}
.form-disclaimer a{
  color: var(--gc-light-blue);
  font-weight: 700;
}

/* Button: full width */
.form-actions{
  margin-top: var(--space-sm);
  display: flex;
}
.button-secondary.submit{
  width: 100%;
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--gc-dark-blue), #0a4d7a);
  color: var(--gc-white);
  box-shadow: 0 12px 24px rgba(3,46,74,0.18);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease, filter .15s ease;
}
.button-secondary.submit:hover{
  transform: translateY(-1px);
  opacity: .98;
  filter: brightness(1.01);
  box-shadow: 0 14px 28px rgba(3,46,74,0.22);
}
.button-secondary.submit:disabled{
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Honeypot hidden */
.hp-field{
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
}

/* MOBILE: form first, then content */
@media (max-width: 980px){
  .fladco-form-grid{
    grid-template-columns: 1fr;
  }

  .form-row{
    grid-template-columns: 1fr;
  }

  .fladco-form-col-inner{
    padding: var(--space-md);
  }

  /* Force order */
  .fladco-form-col-form{ order: 1; }
  .fladco-form-col-content{ order: 2; }
}


/* =========================================================
   THANK YOU MODAL – FINAL FIX
   - Centered on mobile
   - NO horizontal scroll
   - Cards responsive + stacked on small screens
   - Scroll only UP/DOWN (panel scroll)
   ========================================================= */

/* Make sure modal elements calculate widths correctly */
.fladco-modal,
.fladco-modal *{
  box-sizing: border-box;
}

.fladco-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: center;           /* ✅ centered always (desktop + mobile) */
  justify-content: center;
  padding: 14px;
}
.fladco-modal.is-open{ display:flex; }

/* Backdrop */
.fladco-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Panel */
.fladco-modal__panel{
  position: relative;

  /* ✅ width that cannot cause side-scroll */
  width: min(980px, 100%);
  max-width: 980px;

  background: #fff;
  color: var(--gc-text);
  border-radius: 22px;
  padding: clamp(16px, 2.2vw, 26px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  border: 1px solid rgba(15, 23, 42, 0.10);

  /* ✅ scroll ONLY vertically */
  max-height: calc(100svh - 28px);
  overflow-y: auto;
  overflow-x: hidden;            /* ✅ kills horizontal scroll */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Close */
.fladco-modal__close{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #FF8C73;
	color:white;
  display:grid;
  place-items:center;
  cursor:pointer;
}

/* =========================================================
   HEADER
   ========================================================= */

.fladco-thanks__head{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-bottom: 14px;
  padding-right: 44px; /* space for close btn */
}

.fladco-thanks__badge{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0) 55%),
    linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 12px 26px rgba(34,197,94,.28);
  display:grid;
  place-items:center;
  flex: 0 0 auto;
}

.fladco-thanks__check{
  width: 20px;
  height: 12px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.fladco-thanks__kicker{
  margin:0;
  font-weight: 800;
  color:#166534;
  font-size: 1rem;
}

/* ✅ title responsive + can wrap if needed (no overflow) */
.fladco-thanks__title{
  margin: 2px 0 0;
  font-weight: 900;
  color:#0b1220;
  font-size: clamp(1.12rem, 3.4vw, 1.45rem);
  line-height: 1.15;

  /* IMPORTANT: remove nowrap to prevent horizontal scroll */
  white-space: normal;
  overflow-wrap: anywhere;
}

/* =========================================================
   GRID (2 cards desktop, stack mobile)
   ========================================================= */

.fladco-thanks__grid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 10px;
  width: 100%;
  min-width: 0;
}

.fladco-card{
  background:#fff;
  border-radius: 18px;
  border:1px solid rgba(15,23,42,0.10);
  box-shadow:0 14px 34px rgba(2,6,23,0.08);
  padding: 16px;
  min-width: 0; /* ✅ prevents grid overflow */
}

/* LEFT */
.fladco-card__sub{
  margin:0 0 12px;
  color:var(--gc-muted);
  font-size: .95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Call list */
.fladco-calllist{
  display:grid;
  gap:10px;
}

/* ✅ rows NEVER overflow */
.fladco-callrow{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,0.08);
  text-decoration:none;
  width: 100%;
  min-width: 0;
}

.fladco-callrow__icon{
  width:42px;
  height:42px;
  border-radius:12px;
  background:#e0f2fe;
  color:#0369a1;
  display:grid;
  place-items:center;
  flex: 0 0 auto;
}

/* ✅ allow text to shrink + wrap */
.fladco-callrow__text{
  display:flex;
  align-items:baseline;
  gap:8px;
  flex:1 1 auto;
  min-width: 0;
  flex-wrap: wrap;          /* ✅ wrap instead of overflow */
}

.fladco-callrow__state{
  font-weight:800;
  /* remove nowrap */
  white-space: normal;
}

.fladco-callrow__num{
  font-weight:900;
  color:#f97316;

  /* ✅ this prevents side-scroll on small widths */
  white-space: normal;
  overflow-wrap: anywhere;
}

.fladco-callrow__pill{
  width:28px;
  height:28px;
  border-radius:999px;
  background:#083344;
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:900;
  flex: 0 0 auto;
}

/* RIGHT */
.fladco-card__headline{
  font-weight:800;
  margin:0 0 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.fladco-cta{
  display:block;
  text-align:center;
  background:#ff7a00;
  color:#fff;
  border-radius:12px;
  padding:12px;
  font-weight:900;
  text-decoration:none;
  margin-bottom:14px;
  width:100%;
}

.fladco-hours{
  border-top:1px dashed rgba(15,23,42,.18);
  padding-top:12px;
  text-align:center;
}

.fladco-hours__title{
  font-weight:900;
  margin-bottom:8px;
}

.fladco-hours__list{
  list-style:none;
  padding:0;
  margin:0;
  font-size:.9rem;
  display:grid;
  gap:6px;
}

/* FOOTER */
.fladco-thanks__actions{
  margin-top:14px;
}

.fladco-modal__ok{
  width:100%;
  border-radius:999px;
  padding:12px;
  border:0;
  font-weight:900;
  color:#fff;
  background:linear-gradient(135deg,#083344,#0a4d7a);
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

/* ✅ stack cards on smaller screens */
@media (max-width: 860px){
  .fladco-thanks__grid{
    grid-template-columns: 1fr;
  }
}

/* ✅ iPhone / small phones (centered, full width, no side scroll) */
@media (max-width: 480px){
  .fladco-modal{
    padding: 10px;
    align-items: center; /* ✅ keep centered on mobile */
  }

  .fladco-modal__panel{
    width: 100%;
    border-radius: 18px;
    padding: 16px;
    max-height: calc(100svh - 20px);
  }

  .fladco-card{
    padding: 14px;
  }

  .fladco-thanks__head{
    gap: 12px;
    margin-bottom: 12px;
  }

  .fladco-thanks__badge{
    width: 50px;
    height: 50px;
  }
}

/* super small */
@media (max-width: 360px){
  .fladco-thanks__title{
    font-size: 1.08rem;
  }
}
