/* ============================================================
   CEE Platform forms — program inquiry & professional application.
   Full-bleed, modern, with an animated welcome hero.
   Scoped under .cee-form-wrap. Tokens match the blue landing page:
   #6ca5d5 accent / #3d6f9e deep / #1d3043 ink / #eef4fa sky
   ============================================================ */
.cee-form-wrap, .cee-form-wrap *, .cee-form-wrap *::before, .cee-form-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }
.cee-form-wrap {
  --cee-blue: #6ca5d5;
  --cee-deep: #3d6f9e;
  --cee-ink: #1d3043;
  --cee-sky: #eef4fa;
  font-family: 'Nunito Sans', sans-serif;
  color: var(--cee-ink);
  font-size: 17px;
  line-height: 1.6;
  background: #fbfdff;
  -webkit-font-smoothing: antialiased;
  /* Full-bleed: span the viewport even inside a boxed theme/builder container */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: clip;
}
/* Strip padding the page builder wraps around the shortcode */
.elementor-widget-shortcode .elementor-widget-container,
.elementor-widget-text-editor .elementor-widget-container { padding: 0 !important; }

.cee-form-wrap h1, .cee-form-wrap h2, .cee-form-wrap h3 {
  font-family: 'Playfair Display', serif; color: var(--cee-ink); line-height: 1.12; margin: 0; font-weight: 700;
}
.cee-form-wrap p { margin: 0; }
.cee-form-wrap a { color: var(--cee-deep); font-weight: 700; text-decoration: none; }

/* ---------------- HERO ---------------- */
.cee-form-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 70px 24px 110px;
  background:
    radial-gradient(900px 420px at 50% -40%, rgba(108,165,213,.20) 0%, transparent 60%),
    linear-gradient(180deg, var(--cee-sky) 0%, #fbfdff 100%);
}
.cee-form-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.cee-form-hero-bg span {
  position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55;
}
.cee-form-hero-bg span:nth-child(1) { width: 320px; height: 320px; left: 6%; top: -60px; background: rgba(108,165,213,.45); animation: cee-drift 16s ease-in-out infinite; }
.cee-form-hero-bg span:nth-child(2) { width: 240px; height: 240px; right: 8%; top: 20px; background: rgba(61,111,158,.30); animation: cee-drift 20s ease-in-out 2s infinite reverse; }
.cee-form-hero-bg span:nth-child(3) { width: 200px; height: 200px; left: 42%; bottom: 30px; background: rgba(232,161,61,.20); animation: cee-drift 22s ease-in-out 1s infinite; }
@keyframes cee-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -22px); }
}
.cee-form-hero-inner { position: relative; max-width: 760px; margin: 0 auto; }

.cee-form-eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cee-deep);
  background: rgba(108,165,213,.14); border: 1px solid rgba(108,165,213,.28);
  border-radius: 999px; padding: 7px 16px;
  opacity: 0; animation: cee-rise .7s cubic-bezier(.2,.8,.2,1) .05s forwards;
}
.cee-form-welcome {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: clamp(18px, 2.1vw, 22px); color: var(--cee-deep);
  margin-top: 22px;
  opacity: 0; animation: cee-rise .7s cubic-bezier(.2,.8,.2,1) .16s forwards;
}
.cee-form-hero h1 {
  font-size: clamp(34px, 5vw, 56px); margin-top: 8px;
  opacity: 0; animation: cee-rise .8s cubic-bezier(.2,.8,.2,1) .28s forwards;
}
.cee-form-intro {
  font-size: 18px; color: #45617c; max-width: 600px; margin: 18px auto 0;
  opacity: 0; animation: cee-rise .8s cubic-bezier(.2,.8,.2,1) .42s forwards;
}
@keyframes cee-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- BODY (card lifts up into hero) ---------------- */
.cee-form-body {
  position: relative;
  margin-top: -96px;
  padding: 0 24px 100px;
}
.cee-form-layout {
  max-width: 1180px; margin: 0 auto; display: grid; gap: 28px; align-items: start;
  opacity: 0; animation: cee-rise .8s cubic-bezier(.2,.8,.2,1) .55s forwards;
}
.cee-form-layout.has-sidebar { grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr); }
.cee-form-layout.no-sidebar { grid-template-columns: minmax(0, 900px); justify-content: center; }

.cee-form {
  background: #fff; border: 1px solid #e6eef7; border-radius: 22px; padding: 44px 44px 40px;
  box-shadow: 0 30px 70px -34px rgba(29,48,67,.40), 0 4px 14px rgba(29,48,67,.04);
}
.cee-form fieldset { border: 0; margin: 0 0 14px; padding: 0 0 28px; border-bottom: 1px solid #eef3f8; }
.cee-form fieldset:last-of-type { border-bottom: 0; padding-bottom: 6px; }
.cee-form legend {
  font-family: 'Playfair Display', serif; font-size: 23px; font-weight: 700; color: var(--cee-ink);
  margin-bottom: 18px; padding: 0; display: block; width: 100%;
}
.cee-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cee-form-span2 { grid-column: span 2; }
.cee-form-label { display: block; font-size: 13.5px; font-weight: 800; color: #2e4a63; margin-bottom: 7px; letter-spacing: .01em; }
.cee-form-label em { color: #c0492a; font-style: normal; }
.cee-form-field input, .cee-form-field select, .cee-form-field textarea {
  width: 100%; font-family: 'Nunito Sans', sans-serif; font-size: 16px; color: var(--cee-ink);
  background: #f8fbfe; border: 1.5px solid #d4e2ef; border-radius: 12px; padding: 13px 15px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.cee-form-field input::placeholder, .cee-form-field textarea::placeholder { color: #9fb3c6; }
.cee-form-field input:focus, .cee-form-field select:focus, .cee-form-field textarea:focus {
  outline: none; border-color: var(--cee-blue); background: #fff; box-shadow: 0 0 0 4px rgba(108,165,213,.18);
}
.cee-form-field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233d6f9e' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.cee-form-field.cee-invalid input, .cee-form-field.cee-invalid select, .cee-form-field.cee-invalid textarea { border-color: #c0492a; background: #fdf6f4; }
.cee-form-field-msg { font-size: 13px; color: #c0492a; margin-top: 6px; font-weight: 700; }
.cee-form-help { font-size: 13px; color: #5e7b95; margin-top: 6px; }

.cee-form-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cee-form-check {
  display: flex; gap: 11px; align-items: center; background: #f4f9fd; border: 1.5px solid #e3eef8;
  border-radius: 12px; padding: 13px 15px; font-size: 15px; font-weight: 700; color: #2e4a63; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.cee-form-check:hover { border-color: #c3dbf0; }
.cee-form-check:has(input:checked) { border-color: var(--cee-blue); background: #e4f0fa; }
.cee-form-check input { width: 18px; height: 18px; accent-color: var(--cee-deep); flex-shrink: 0; }

.cee-form-hp { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

.cee-form-submit {
  display: inline-block; cursor: pointer; font-family: 'Nunito Sans', sans-serif;
  font-size: 17px; font-weight: 800; color: #fff; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--cee-blue) 0%, var(--cee-deep) 100%);
  padding: 17px 40px; box-shadow: 0 12px 26px -10px rgba(61,111,158,.6);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.cee-form-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(61,111,158,.7); filter: brightness(1.04); }
.cee-form-submit:focus-visible { outline: 3px solid #e8a13d; outline-offset: 3px; }
.cee-form-submit[disabled] { opacity: .6; cursor: wait; transform: none; }
.cee-form-fineprint { margin-top: 16px; font-size: 13.5px; color: #5e7b95; }
.cee-form-error {
  background: #fdf0ee; border: 1px solid #f0cdc6; color: #a23a1f; font-weight: 700; font-size: 15px;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
}

/* ---------------- Sidebar ---------------- */
.cee-form-side { display: grid; gap: 18px; position: sticky; top: 28px; }
.cee-form-side-card { background: #fff; border: 1px solid #e6eef7; border-radius: 18px; padding: 28px; box-shadow: 0 10px 30px -18px rgba(29,48,67,.30); }
.cee-form-side-card h3 { font-size: 20px; margin-bottom: 14px; }
.cee-form-side-card p { font-size: 15px; color: #45617c; }
.cee-form-pricing { list-style: none; display: grid; gap: 9px; }
.cee-form-pricing li { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; color: #45617c; border-bottom: 1px dashed #e2ecf5; padding-bottom: 9px; }
.cee-form-pricing b { font-family: 'Playfair Display', serif; font-size: 17px; color: var(--cee-deep); }
.cee-form-side-note { margin-top: 14px; font-size: 13.5px; color: #5e7b95; }
.cee-form-side-grant { background: linear-gradient(135deg, #f3b14e 0%, #e8a13d 100%); border: 0; box-shadow: 0 14px 32px -16px rgba(232,161,61,.6); }
.cee-form-side-grant h3 { color: #3a2706; }
.cee-form-side-grant p { color: #4b3408; font-weight: 600; }

/* ---------------- Success ---------------- */
.cee-form-success {
  max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid #e6eef7; border-radius: 22px;
  padding: 76px 36px; box-shadow: 0 30px 70px -34px rgba(29,48,67,.40); text-align: center;
}
.cee-form-success-mark {
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cee-blue), var(--cee-deep)); color: #fff;
  font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
  box-shadow: 0 14px 30px -10px rgba(61,111,158,.6);
  animation: cee-pop .5s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes cee-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
.cee-form-success h2 { font-size: clamp(26px, 3.4vw, 38px); }
.cee-form-success p { margin: 14px auto 28px; max-width: 520px; color: #45617c; }
.cee-form-success-link { display: inline-block; font-weight: 800; color: #fff; border-radius: 12px; padding: 15px 32px; background: linear-gradient(135deg, var(--cee-blue), var(--cee-deep)); }

/* ---------------- Responsive ---------------- */
@media (max-width: 920px) {
  .cee-form-layout.has-sidebar { grid-template-columns: 1fr; }
  .cee-form-side { position: static; }
}
@media (max-width: 560px) {
  .cee-form-hero { padding: 56px 20px 90px; }
  .cee-form { padding: 26px 20px; border-radius: 18px; }
  .cee-form-grid, .cee-form-checks { grid-template-columns: 1fr; }
  .cee-form-span2 { grid-column: span 1; }
  .cee-form-body { padding: 0 16px 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .cee-form-wrap *, .cee-form-wrap *::before, .cee-form-wrap *::after { animation: none !important; transition: none !important; }
  .cee-form-eyebrow, .cee-form-welcome, .cee-form-hero h1, .cee-form-intro, .cee-form-layout, .cee-form-success-mark { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Sit flush under the nav. This stylesheet loads ONLY on pages
   that contain a CEE form, so hiding the theme's page-title
   banner here is safe and doesn't affect other pages.
   Targets Hestia's page header + title and zeroes the gap.
   ============================================================ */
.page-header,
.header-half-background,
.title-in-header,
.hestia-title,
.page-header.header-small {
  display: none !important;
}
.entry-title.hestia-title,
.single-page .page-header { display: none !important; }

/* Remove the top spacing Hestia leaves above page content */
.blog-post,
.hestia-blog-content,
.page-content,
.content-area,
.site-content,
#content,
#primary {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Pull the form section flush to the navbar */
.cee-form-wrap { margin-top: 0 !important; }

/* ============================================================
   Counties multi-select dropdown (chips + scroll + search)
   ============================================================ */
.cee-ms { position: relative; }
.cee-ms-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fbfe !important;
  border: 1.5px solid #d4e2ef !important;
  border-radius: 12px !important;
  padding: 13px 15px !important;
  font-family: 'Nunito Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #1d3043 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-align: left !important;
  box-shadow: none !important;
  min-height: 0 !important;
  height: auto !important;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.cee-ms-toggle:hover { border-color: #bcd2e6 !important; background: #f8fbfe !important; }
.cee-ms.is-open .cee-ms-toggle { border-color: var(--cee-blue) !important; background: #fff !important; box-shadow: 0 0 0 4px rgba(108,165,213,.18) !important; }
.cee-ms-text { color: #1d3043 !important; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cee-ms.is-empty .cee-ms-text { color: #9fb3c6 !important; font-weight: 400 !important; }
.cee-ms-caret { width: 16px; height: 16px; color: #3d6f9e !important; flex: 0 0 auto; transition: transform .2s ease; }
.cee-ms.is-open .cee-ms-caret { transform: rotate(180deg); }

/* selected chips */
.cee-ms-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.cee-ms-chips:empty { display: none; }
.cee-ms-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eff4fa;
  border: 1px solid #d4e4f2;
  color: #3d6f9e;
  font-size: 13px; font-weight: 700;
  padding: 5px 6px 5px 11px;
  border-radius: 999px;
}
.cee-ms-chip-x {
  border: 0; background: rgba(61,111,158,.12); color: #3d6f9e;
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.cee-ms-chip-x:hover { background: rgba(61,111,158,.28); }

/* dropdown panel */
.cee-ms-panel {
  position: absolute;
  z-index: 40;
  left: 0; right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e2edf6;
  border-radius: 14px;
  box-shadow: 0 26px 60px -28px rgba(29,48,67,.5);
  overflow: hidden;
  display: none;
}
.cee-ms.is-open .cee-ms-panel { display: block; animation: cee-ms-pop .16s ease; }
@keyframes cee-ms-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cee-ms-search { padding: 10px; border-bottom: 1px solid #eef3f8; background: #fff; position: sticky; top: 0; }
.cee-ms-filter {
  width: 100%; border: 1.5px solid #e2edf6; border-radius: 10px;
  padding: 9px 12px; font: inherit; font-size: 14px; color: #1d3043;
}
.cee-ms-filter:focus { outline: none; border-color: #6ca5d5; box-shadow: 0 0 0 3px rgba(108,165,213,.18); }
.cee-ms-list { list-style: none; margin: 0; padding: 6px; max-height: 264px; overflow-y: auto; }
.cee-ms-opt {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px; cursor: pointer;
  font-size: 14.5px; color: #2c4257;
}
.cee-ms-opt:hover { background: #f4f8fc; }
.cee-ms-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.cee-ms-box {
  flex: 0 0 auto; width: 19px; height: 19px; border-radius: 6px;
  border: 1.5px solid #c6d8e8; background: #fff;
  position: relative; transition: background .12s ease, border-color .12s ease;
}
.cee-ms-opt.is-on .cee-ms-box,
.cee-ms-opt input:checked + .cee-ms-box {
  background: linear-gradient(135deg, #6ca5d5, #3d6f9e); border-color: #3d6f9e;
}
.cee-ms-opt.is-on .cee-ms-box::after,
.cee-ms-opt input:checked + .cee-ms-box::after {
  content: ''; position: absolute; left: 6px; top: 2.5px;
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cee-ms-opt.is-on { color: #1d3043; font-weight: 700; }
.cee-ms-empty { padding: 16px; text-align: center; color: #6d8499; font-size: 14px; }
