/* Optiv IQ calculator styles — extracted from source index.html, scoped to #optiv-iq-root. */
/* ============================================================================
   OPTIV IQ - FUNNEL STYLES
   The Optiv Group. Proprietary.
   ----------------------------------------------------------------------------
   Minimal shell styling for the [optiv_iq] shortcode steps. Calculator
   internals (optiv-app.js output) bring their own markup/classnames and are
   intentionally left unstyled here — this file only owns the funnel shell
   (#optiv-iq-root, [data-step], gate video, upload drop zone).
   ============================================================================ */

#optiv-iq-root {
  /* Full width of the (Breakdance) container; the calculator's .wrap centers
     content at max-width:1240px. Do NOT cap #optiv-iq-root here or the .wrap
     can never exceed that cap. */
  width: 100%;
  font-family: inherit;
}

#optiv-iq-root [data-step][hidden] {
  display: none;
}

#optiv-iq-root [data-step] {
  display: block;
}

/* Layout (design review). The funnel renders inside a Breakdance section that
   can inherit text-align:center — force the source's left default (incl. the
   top compliance strip + creed) and let the body copy span the full width. */
#optiv-iq-root .wrap {
  text-align: left;
}
#optiv-iq-root .sub {
  max-width: none;
}

#optiv-iq-root .oiq-gate-wrap {
  position: relative;
}

#optiv-iq-root #oiq-gate {
  display: block;
  width: 100%;
  border-radius: 8px;
  background: #000;
}

#optiv-iq-root .oiq-gate-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#optiv-iq-root .oiq-gate-play:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ---- gate failure fallback: video error/stall escape hatch --------------
   Hidden in the normal (successful playback) case; only shown by
   onGateFailure() in funnel.js. The explicit [hidden] override is required
   because .oiq-gate-fallback sets display:flex at equal specificity to the
   UA [hidden] rule, same pattern as .oiq-modal[hidden] below. */
#optiv-iq-root .oiq-gate-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  text-align: center;
  border-radius: 8px;
}

#optiv-iq-root .oiq-gate-fallback[hidden] {
  display: none;
}

#optiv-iq-root .oiq-gate-fallback p {
  margin: 0;
  font-size: 1rem;
}

#optiv-iq-root .oiq-gate-continue {
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#optiv-iq-root .oiq-gate-continue:hover {
  background: #1d4ed8;
}

#optiv-iq-root .oiq-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  border: 2px dashed #c9c9c9;
  border-radius: 12px;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

#optiv-iq-root .oiq-drop.over {
  border-color: #2563eb;
  background-color: rgba(37, 99, 235, 0.06);
}

#optiv-iq-root .oiq-drop .big {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

#optiv-iq-root .oiq-err {
  color: #b91c1c;
  font-size: 0.9rem;
  min-height: 1.2em;
}

/* Reveal-video skip control: secondary (ghost) button, a touch smaller than the
   default .btn. Same-specificity as .btn but loaded later, so these win. */
#optiv-iq-root .oiq-processing-bar {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

#optiv-iq-root .oiq-skip {
  padding: 8px 16px;
  font-size: 12px;
}

/* Processing state: a subtle teal shimmer sweeps across the button while the
   census converts. Reverts to a plain ghost button once it becomes "Skip". */
#optiv-iq-root .oiq-skip[disabled] {
  cursor: default;
  background-color: #fff;
  background-image: linear-gradient(100deg, rgba(74,144,164,0) 30%, rgba(74,144,164,0.22) 50%, rgba(74,144,164,0) 70%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  animation: oiq-shimmer 1.5s linear infinite;
}

@keyframes oiq-shimmer {
  0%   { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

/* Slow-spinning ring shown next to "Processing". */
#optiv-iq-root .oiq-spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  vertical-align: -2px;
  border: 2px solid rgba(27, 54, 89, 0.22);
  border-top-color: var(--teal, #4A90A4);
  border-radius: 50%;
  animation: oiq-spin 1.5s linear infinite;
}

@keyframes oiq-spin { to { transform: rotate(360deg); } }

/* Current-step label under the processing button. */
#optiv-iq-root .oiq-status {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--slate, #5f7488);
  min-height: 1.2em;
}

/* ---- carrier tabs (Carrier A / Carrier B) -------------------------------
   Sticky at the top of the results while the user scrolls. Active tab = red
   (crimson), inactive = light blue, per spec. */
#optiv-iq-root .oiq-tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 12px;
  /* Opaque, matched to the page background so results scroll UNDER the sticky
     bar instead of showing through it. --ltgray is the calculator's page bg. */
  background: var(--ltgray, #f4f6f8);
}

#optiv-iq-root .oiq-tab {
  flex: 0 0 auto;
  padding: 11px 26px;
  border: 1px solid #cfe4ec;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: #eaf4f7;                 /* light blue = inactive */
  color: var(--navy, #1b3659);
  transition: background-color 0.12s ease, color 0.12s ease;
}

#optiv-iq-root .oiq-tab:hover { background: #dcecf3; }

#optiv-iq-root .oiq-tab.active {
  background: var(--crimson, #841617); /* red = active */
  border-color: var(--crimson, #841617);
  color: #fff;
}

#optiv-iq-root .oiq-carrier[hidden] { display: none; }

/* ---- results: dual CTA + contact/booking modal (Task C4) ----------------
   The calculator's own render nodes (#congratsBanner, #carrierFields, ...)
   bring their own markup/classnames and are intentionally left unstyled
   here, same as the rest of this file. */

#optiv-iq-root .oiq-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 24px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #4b5b6e;
  cursor: pointer;
}
#optiv-iq-root .oiq-consent input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  cursor: pointer;
}
/* Disabled CTAs (before consent) read as inactive, not clickable. */
#optiv-iq-root .oiq-cta .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#optiv-iq-root .oiq-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 24px;
}

#optiv-iq-root .oiq-primary,
#optiv-iq-root .oiq-secondary {
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #2563eb;
}

#optiv-iq-root .oiq-primary {
  background: #2563eb;
  color: #fff;
}

#optiv-iq-root .oiq-primary:hover {
  background: #1d4ed8;
}

#optiv-iq-root .oiq-secondary {
  background: transparent;
  color: #2563eb;
}

#optiv-iq-root .oiq-secondary:hover {
  background: rgba(37, 99, 235, 0.06);
}

#optiv-iq-root .oiq-modal[hidden] {
  display: none;
}

#optiv-iq-root .oiq-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
}

#optiv-iq-root .oiq-modalcard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
}

#optiv-iq-root .oiq-modalcard h3 {
  margin: 0;
}

#optiv-iq-root .oiq-modalcard input {
  padding: 10px 12px;
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  font-size: 1rem;
}

/* Modal buttons are styled by the calculator's .btn / .btn.ghost classes
   (crimson + white/navy outline) applied in funnel.js — no funnel override here,
   or it would out-specify .btn and turn them blue again. */
#optiv-iq-root .oiq-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

#optiv-iq-root .oiq-modalcard.oiq-booking {
  position: relative;
  max-width: 700px;
  width: 100%;
  max-height: 92vh;
  padding: 12px;
  overflow-y: auto;
}

/* Top-right close icon (replaces the old Done button, which read like the
   booking action). Overlays the widget's empty top-right corner. */
#optiv-iq-root .oiq-booking-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 42, 58, 0.08);
  color: #0f2a3a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#optiv-iq-root .oiq-booking-close:hover {
  background: rgba(15, 42, 58, 0.16);
}

/* GHL calendar widget. form_embed.js resizes the iframe to its content height;
   the 800px baseline keeps it usable if the resize script hasn't run yet. */
#optiv-iq-root .oiq-booking-frame {
  display: block;
  width: 100%;
  height: 800px;
  border: none;
  border-radius: 6px;
}

#optiv-iq-root .oiq-thanks {
  text-align: center;
  padding: 48px 24px;
}

