/* =========================================================
   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{
  color: var(--gc-light-blue);
  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 (UPGRADED DESIGN)
   ========================================================= */

.fladco-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;

  /* ✅ CENTER THE PANEL (NO DESIGN CHANGE) */
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.fladco-modal.is-open{
  display: flex; /* ✅ this is the key */
}

/* Backdrop: blur + nicer dim */
.fladco-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fladcoBackdropIn .18s ease-out both;
}

/* Panel: keep SAME design, just remove top margin */
.fladco-modal__panel{
  position: relative;
  width: min(560px, calc(100% - 28px));
  margin: 0; /* ✅ was 12vh auto 0; now centered */
  background: #fff;
  color: var(--gc-text);
  border-radius: 20px;
  padding: 26px 22px 20px;
  box-shadow:
    0 18px 60px rgba(0,0,0,0.35),
    0 2px 0 rgba(255,255,255,0.8) inset;
  border: 1px solid rgba(15, 23, 42, 0.10);
  overflow: hidden;
  animation: fladcoPanelIn .22s cubic-bezier(.2,.9,.2,1) both;
}

/* Subtle top accent / glow */
.fladco-modal__panel::before{
  content:"";
  position:absolute;
  left:-20%;
  top:-40%;
  width:140%;
  height:55%;
  background:
    radial-gradient(closest-side,
      rgba(0,145,235,0.22),
      rgba(0,145,235,0.00) 70%);
  pointer-events:none;
}

/* Success badge icon (pure CSS) */
.fladco-modal__panel::after{
  content:"";
  position:absolute;
  left: 22px;
  top: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.0) 55%),
    linear-gradient(135deg, var(--gc-light-blue), var(--gc-dark-blue));
  box-shadow: 0 10px 22px rgba(0,145,235,0.22);
}

/* Title + check mark */
.fladco-modal__panel h3{
  margin: 0 0 6px;
  padding-left: 60px;
 
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--gc-text);
}
.fladco-modal__panel h3::before{
  content:"";
  position:absolute;
  left: 34px;
  top: 33px;
  width: 18px;
  height: 10px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

/* Body text */
.fladco-modal__panel p{
  margin: 0;
  padding-left: 60px;
  color: var(--gc-muted);

  line-height: 1.45;
}

/* Close button: modern pill */
.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: rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.fladco-modal__close:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.92);
  border-color: rgba(0,145,235,0.25);
}

/* OK button as primary CTA */
.fladco-modal__ok{
  margin-top: 18px;
  width: 100%;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--gc-dark-blue), #0a4d7a);
  box-shadow: 0 12px 24px rgba(3,46,74,0.22);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.fladco-modal__ok:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 14px 28px rgba(3,46,74,0.26);
}
.fladco-modal__ok:active{
  transform: translateY(0px);
}

/* Animations */
@keyframes fladcoBackdropIn{
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fladcoPanelIn{
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile spacing (keep same look) */
@media (max-width: 520px){
  .fladco-modal__panel{
    padding: 22px 18px 18px;
    border-radius: 18px;
  }
  .fladco-modal__panel::after{ left: 18px; }
  .fladco-modal__panel h3{ padding-left: 56px; }
  .fladco-modal__panel p{ padding-left: 56px; }
}
