/*
Theme Name: BLUEPRINT INTERACTIVE Theme
Author: Blueprint Interactive
Author URI: https://blueprintinteractive.com
Description: Blueprint Interactive Custom Theme.
Version: 2.0
License: GNU General Public License
/* -------------------------------------------------------------- */
/* Normalize Reset 
-------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
   ========================================================================== */
/**
 * Remove the margin in all browsers.
 */
body {
  margin: 0;
}
/**
 * Render the `main` element consistently in IE.
 */
main {
  display: block;
}
/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
/* Grouping content
   ========================================================================== */
/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}
/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}
/* Text-level semantics
   ========================================================================== */
/**
 * Remove the gray background on active links in IE 10.
 */
a {
  background-color: transparent;
}
/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}
/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
  font-weight: bolder;
}
/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}
/**
 * Add the correct font size in all browsers.
 */
small {
  font-size: 80%;
}
/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
 * Remove the border on images inside links in IE 10.
 */
img {
  border-style: none;
}
/* Forms
   ========================================================================== */
/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}
/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
button,
input {
  /* 1 */
  overflow: visible;
}
/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
button,
select {
  /* 1 */
  text-transform: none;
}
/**
 * Correct the inability to style clickable types in iOS and Safari.
 */
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}
/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}
/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}
/**
 * Correct the padding in Firefox.
 */
fieldset {
  padding: 0.35em 0.75em 0.625em;
}
/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */
legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}
/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
  vertical-align: baseline;
}
/**
 * Remove the default vertical scrollbar in IE 10+.
 */
textarea {
  overflow: auto;
}
/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */
[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}
/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}
/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}
/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}
/* Interactive
   ========================================================================== */
/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */
details {
  display: block;
}
/*
 * Add the correct display in all browsers.
 */
summary {
  display: list-item;
}
/* Misc
   ========================================================================== */
/**
 * Add the correct display in IE 10+.
 */
template {
  display: none;
}
/**
 * Add the correct display in IE 10.
 */
[hidden] {
  display: none;
}

.searchai-brand-caret {
  display: none;
}

/* -------------------------------------------------------------- */
/* Animate CSS
-------------------------------------------------------------- */
.fade-in-from-left {
  opacity: 0;
  animation-timing-function: ease-out;
  -webkit-transform: translateX(-15px);
  -moz-transform: translateX(-15px);
  -o-transform: translateX(-15px);
  -ms-transform: translateX(-15px);
  transform: translateX(-15px);
}

.animated {
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

.fade-in-from-left.animated {
  animation-name: fade-from-left;
  animation-duration: 0.5s;
  opacity: 1;
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -o-transform: translateX(0);
  -ms-transform: translateX(0);
  transform: translateX(0);
}

@keyframes fade-from-left {
  0% {
    opacity: 0;
    -webkit-transform: translateX(-15px);
    -moz-transform: translateX(-15px);
    -o-transform: translateX(-15px);
    -ms-transform: translateX(-15px);
    transform: translateX(-15px);
  }

  45% {
    opacity: 0.5;
  }

  90% {
    opacity: 1;
  }

  100% {
    -webkit-transform: translateX(0);
    -moz-transform: translateX(0);
    -o-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
  }
}

.fade-in-from-bottom {
  opacity: 0;
  animation-timing-function: ease-out;
  -webkit-transform: translateY(15px);
  -moz-transform: translateY(15px);
  -o-transform: translateY(15px);
  -ms-transform: translateY(15px);
  transform: translateY(15px);
}

.fade-in-from-bottom.animated {
  animation-name: fade-from-bottom;
  animation-duration: 1s;
  opacity: 1;
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -o-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
}

@keyframes fade-from-bottom {
  0% {
    opacity: 0;
    -webkit-transform: translateY(15px);
    -moz-transform: translateY(15px);
    -o-transform: translateY(15px);
    -ms-transform: translateY(15px);
    transform: translateY(15px);
  }
  90% {
    opacity: 1;
  }
  100% {
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -o-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
  }
}

.fade-in-from-right {
  opacity: 0;
  animation-timing-function: ease-out;
  -webkit-transform: translateX(40px);
  -moz-transform: translateX(40px);
  -o-transform: translateX(40px);
  -ms-transform: translateX(40px);
  transform: translateX(40px);
}

.fade-in-from-right.animated {
  animation-name: fade-from-right;
  animation-duration: 0.5s;
  opacity: 1;
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -o-transform: translateX(0);
  -ms-transform: translateX(0);
  transform: translateX(0);
}

@keyframes fade-from-right {
  0% {
    opacity: 0;
    -webkit-transform: translateX(40px);
    -moz-transform: translateX(40px);
    -o-transform: translateX(40px);
    -ms-transform: translateX(40px);
    transform: translateX(40px);
  }

  90% {
    opacity: 1;
  }

  100% {
    -webkit-transform: translateX(0);
    -moz-transform: translateX(0);
    -o-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* -------------------------------------------------------------- */
/* Search.ai Home (page-home.php)
-------------------------------------------------------------- */
/* Hidden attribute must win over our own display:flex rules */
.searchai-page [hidden],
.searchai-page[hidden] {
  display: none !important;
}

.searchai-page {
  /* Theme palette (red / ominous) — overridden by .searchai-page--purple */
  --sai-bg: #140808;
  --sai-bg-rgb: 20, 8, 8;
  --sai-panel: #261414;
  --sai-panel-2: #333;
  --sai-text: #ececec;
  --sai-muted: #9a9a9a;
  --sai-accent: #7f1d1d;
  --sai-accent-2: #b91c1c;
  --sai-accent-rgb: 185, 28, 28;
  --sai-bubble: #261414;
  --sai-spark: #ef4444;
  --sai-spark-rgb: 239, 68, 68;
  --sai-spark-deep-rgb: 127, 29, 29;
  --sai-link: #fca5a5;
  --sai-hover: #1f0e0e;
  --sai-step-hover: #2a1818;
  --sai-icon-bg: #1a0f0f;

  position: relative;
  min-height: 100vh;
  background: var(--sai-bg);
  color: var(--sai-text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* Purple palette — apply class on the <article> for the purple variant */
.searchai-page--purple {
  --sai-bg: #191919;
  --sai-bg-rgb: 25, 25, 25;
  --sai-panel: #2a2a2a;
  --sai-bubble: #2f2f2f;
  --sai-accent: #3a6df0;
  --sai-accent-2: #4e7df3;
  --sai-accent-rgb: 78, 125, 243;
  --sai-spark: #c084fc;
  --sai-spark-rgb: 192, 132, 252;
  --sai-spark-deep-rgb: 124, 58, 237;
  --sai-link: #9ab5ff;
  --sai-hover: #252525;
  --sai-step-hover: #353535;
  --sai-icon-bg: #202020;
}

/* Green palette — apply class on the <article> for the green variant */
.searchai-page--green {
  --sai-bg: #0a1006;
  --sai-bg-rgb: 10, 16, 6;
  --sai-panel: #16200d;
  --sai-bubble: #16200d;
  --sai-accent: #349a14;
  --sai-accent-2: #6ea90f;
  --sai-accent-rgb: 120, 182, 18;
  --sai-spark: #78b612;
  --sai-spark-rgb: 120, 182, 18;
  --sai-spark-deep-rgb: 52, 154, 20;
  --sai-link: #a3d44e;
  --sai-hover: #0f1708;
  --sai-step-hover: #1a260f;
  --sai-icon-bg: #101809;
}

.searchai-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 24px 80px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Topbar */
.searchai-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 36px;
}
.searchai-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.searchai-brand-mark {
  display: inline-flex;
  color: #fff;
}
.searchai-brand-caret {
  color: var(--sai-muted);
  margin-left: 2px;
}
.searchai-share {
  position: relative;
  background: transparent;
  border: 0;
  color: var(--sai-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.searchai-share:hover {
  background: var(--sai-hover);
  color: #fff;
}
.searchai-share.is-copied::after {
  content: "Link copied";
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--sai-panel);
  color: var(--sai-text);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: saiToast 1.5s ease forwards;
}
@keyframes saiToast {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  15%,
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Stage: initial */
.searchai-stage--initial {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 22vh;
  gap: 22px;
}
.searchai-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
}
.searchai-greeting-title {
  font-size: 26px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Staged entrance on the initial stage */
.searchai-stage--initial .searchai-sparkle {
  display: inline-flex;
  animation: saiSparkleIn 0.85s cubic-bezier(0.34, 1.56, 0.4, 1) both;
}
.searchai-stage--initial .searchai-sparkle svg {
  animation: saiTwinkle 2.6s ease-in-out 1.1s infinite;
  transform-origin: center;
  filter: drop-shadow(0 0 0 rgba(var(--sai-spark-rgb), 0));
}
.searchai-stage--initial .searchai-greeting-title {
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #ffffff 33%,
    var(--sai-spark) 50%,
    #ffffff 67%,
    #ffffff 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation:
    saiFadeUp 0.7s ease 0.35s both,
    saiShine 1.08s linear 0.5s 2 forwards;
}
@keyframes saiShine {
  from {
    background-position: 0% center;
  }
  to {
    background-position: 100% center;
  }
}
.searchai-stage--initial .searchai-form {
  animation: saiFadeUp 0.7s ease 1s both;
}

@keyframes saiSparkleIn {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(-160deg);
    filter: blur(4px);
  }
  60% {
    opacity: 1;
    transform: scale(1.2) rotate(12deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: blur(0);
  }
}
@keyframes saiTwinkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
    filter: drop-shadow(0 0 0 rgba(var(--sai-spark-rgb), 0));
  }
  50% {
    transform: scale(1.08) rotate(6deg);
    filter: drop-shadow(0 0 8px rgba(var(--sai-spark-rgb), 0.75));
  }
}
@keyframes saiFadeUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .searchai-stage--initial .searchai-sparkle,
  .searchai-stage--initial .searchai-sparkle svg,
  .searchai-stage--initial .searchai-form,
  .searchai-step.is-visible:not(.is-done)::before,
  .searchai-answer-icon:hover svg,
  .searchai-answer-icon--toggle:focus-visible svg {
    animation: none;
  }
  .searchai-stage--initial .searchai-greeting-title {
    animation: none;
    background: none;
    color: var(--sai-text);
    -webkit-text-fill-color: currentColor;
  }
}

/* === Brand logo image === */
.searchai-brand-mark img {
  display: block;
  height: 26px;
  width: auto;
}

/* === Answer icon: hover sparkle + toggle button === */
.searchai-answer-icon {
  transition: box-shadow 0.2s ease;
}
.searchai-answer-icon--toggle {
  cursor: pointer;
  border: 0;
  padding: 0;
}
.searchai-answer-icon--toggle:hover {
  transform: scale(1.06);
}
.searchai-answer-icon--toggle[aria-expanded="true"] {
  box-shadow: 0 0 14px 1px rgba(var(--sai-spark-rgb), 0.55);
}
.searchai-answer-icon:hover svg,
.searchai-answer-icon--toggle:focus-visible svg {
  animation: saiAnswerSparkle 1.4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes saiAnswerSparkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
    filter: drop-shadow(0 0 0 rgba(var(--sai-spark-rgb), 0));
  }
  50% {
    transform: scale(1.2) rotate(14deg);
    filter: drop-shadow(0 0 9px rgba(var(--sai-spark-rgb), 0.85));
  }
}

/* === Answer summary card === */
.searchai-answer-summary {
  background: linear-gradient(
    180deg,
    rgba(var(--sai-spark-deep-rgb), 0.14),
    rgba(var(--sai-spark-deep-rgb), 0.04)
  );
  border: 1px solid rgba(var(--sai-spark-rgb), 0.28);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #ececec;
  animation: saiSummaryIn 0.32s ease;
}
.searchai-answer-summary p {
  margin: 0;
}
@keyframes saiSummaryIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === About modal === */
.searchai-about {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  animation: saiFadeIn 0.2s ease;
}
.searchai-about-inner {
  position: relative;
  width: min(560px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--sai-panel);
  border-radius: 14px;
  padding: 28px 28px 24px;
  color: var(--sai-text);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}
.searchai-about-inner h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
}
.searchai-about-body {
  font-size: 14px;
  line-height: 1.55;
  color: #cfcfcf;
}
.searchai-about-body p {
  margin: 0 0 12px;
}
.searchai-about-body p:last-child {
  margin-bottom: 0;
}
.searchai-about-body h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--sai-text);
}
.searchai-about-body h4 {
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sai-text);
}
.searchai-about-body ul,
.searchai-about-body ol {
  margin: 0 0 12px 18px;
  padding: 0;
}
.searchai-about-body li {
  margin: 3px 0;
}
.searchai-about-body a {
  color: var(--sai-link);
  text-decoration: none;
}
.searchai-about-body a:hover {
  text-decoration: underline;
}
.searchai-about-body strong {
  color: var(--sai-text);
}
.searchai-about-close {
  position: absolute;
  top: 6px;
  right: 12px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.searchai-about-close:hover {
  color: var(--sai-muted);
}
@keyframes saiFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* === "Click submit to continue" cue (appears 5s after typing finishes) === */
.searchai-cue {
  position: relative;
  margin-top: -4px;
  /* sit under the submit button: right-edge aligns to the form's right edge */
  align-self: flex-end;
  margin-right: calc((100% - min(640px, 100%)) / 2);
  font-size: 12px;
  color: var(--sai-text);
  background: var(--sai-panel);
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: saiCueIn 0.45s ease both;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}
.searchai-cue:hover {
  background: var(--sai-step-hover);
  border-color: rgba(var(--sai-spark-rgb), 0.35);
  transform: translateY(-1px);
}
.searchai-cue::before {
  content: "";
  position: absolute;
  top: -5px;
  left: auto;
  right: 17px; /* centered under the submit button (34px wide, 6px right pad) */
  width: 9px;
  height: 9px;
  background: var(--sai-panel);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transform: rotate(45deg);
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}
.searchai-cue:hover::before {
  background: var(--sai-step-hover);
  border-left-color: rgba(var(--sai-spark-rgb), 0.35);
  border-top-color: rgba(var(--sai-spark-rgb), 0.35);
}
@keyframes saiCueIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === 404 page === */
.searchai-stage--404 {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 14vh;
}
.searchai-stage--404 .searchai-question-bubble {
  word-break: break-all;
  overflow-wrap: anywhere;
  animation: saiFadeUp 0.5s ease 0.15s both;
}
.searchai-stage--404 .searchai-answer {
  animation: saiFadeUp 0.5s ease 0.5s both;
}
.searchai-404-message {
  max-width: 520px;
}
.searchai-404-badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--sai-spark);
  background: rgba(var(--sai-spark-rgb), 0.12);
  border: 1px solid rgba(var(--sai-spark-rgb), 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}
.searchai-404-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
  color: var(--sai-text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.searchai-404-message p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  color: #cfcfcf;
}
.searchai-404-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--sai-accent-2), var(--sai-accent));
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: filter 0.22s ease;
}
.searchai-404-cta:hover {
  filter: brightness(1.12);
}
.searchai-404-cta svg {
  transition: transform 0.22s ease;
}
.searchai-404-cta:hover svg {
  transform: translateX(-2px);
}
/* Darker, less-bright button for the green 404 */
.searchai-page--green .searchai-404-cta {
  background: linear-gradient(180deg, #358a16, #1e5c0c);
}

/* 404 answer-icon tooltip */
.searchai-stage--404 .searchai-answer-icon {
  position: relative;
  cursor: help;
}
.searchai-stage--404 .searchai-answer-icon::after {
  content: "Sorry — Page not found";
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-3px);
  white-space: nowrap;
  background: var(--sai-panel);
  color: var(--sai-text);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.searchai-stage--404 .searchai-answer-icon:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 460px) {
  .searchai-stage--404 {
    padding-top: 9vh;
  }
  .searchai-404-title {
    font-size: 20px;
  }
}

/* Form (pill) */
.searchai-form {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  width: min(640px, 100%);
  background: var(--sai-panel);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  gap: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.searchai-form--docked {
  margin-top: auto;
}
.searchai-attach {
  position: relative;
  background: transparent;
  border: 0;
  color: var(--sai-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
}
.searchai-attach::after {
  content: "Upgrade to Search.ai Max to include attachments";
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  white-space: nowrap;
  background: var(--sai-panel);
  color: var(--sai-text);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  z-index: 2147483647;
}
.searchai-attach::before {
  content: "";
  position: absolute;
  top: calc(100% + 7px);
  left: 14px;
  width: 8px;
  height: 8px;
  background: var(--sai-panel);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transform: rotate(45deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 2147483647;
}
.searchai-attach:hover::after,
.searchai-attach:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.searchai-attach:hover::before,
.searchai-attach:focus-visible::before {
  opacity: 1;
}

/* Hide the paperclip button entirely on touch / tablet / mobile */
@media (hover: none), (max-width: 1024px) {
  .searchai-attach {
    display: none;
  }
}
.searchai-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--sai-text);
  font-size: 15px;
  padding: 10px 4px;
  caret-color: transparent; /* fake "|" is drawn in JS; hide native caret */
}
.searchai-input::placeholder {
  color: var(--sai-muted);
}
@media (max-width: 450px) {
  .searchai-input {
    font-size: 14px;
  }
}
@media (max-width: 370px) {
  .searchai-input {
    font-size: 13px;
  }
}
.searchai-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, var(--sai-accent-2), var(--sai-accent));
  color: #fff;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}
.searchai-submit:hover {
  transform: scale(1.05);
}
.searchai-submit--ghost {
  background: #444;
  opacity: 0.55;
  cursor: default;
}

/* Attention pulse — only after typewriter finishes (JS adds .is-ready) */
.searchai-stage--initial .searchai-submit.is-ready {
  animation: saiPulseRing 1.8s ease-out infinite;
}
.searchai-stage--initial .searchai-submit.is-ready:hover {
  animation: none;
  box-shadow: 0 0 0 4px rgba(var(--sai-accent-rgb), 0.35);
}
@keyframes saiPulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--sai-accent-rgb), 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(var(--sai-accent-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--sai-accent-rgb), 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .searchai-stage--initial .searchai-submit.is-ready {
    animation: none;
  }
}

/* Conversation */
.searchai-stage--conversation {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 8px;
}
.searchai-question-bubble {
  align-self: flex-end;
  background: var(--sai-bubble);
  padding: 10px 18px;
  border-radius: 18px;
  font-size: 15px;
  max-width: 80%;
}
.searchai-answer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.searchai-answer-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sai-icon-bg);
  border-radius: 50%;
}
.searchai-answer-body {
  flex: 1;
  min-width: 0;
}

/* Loading steps (pill list, fade in one by one) */
.searchai-loading {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.searchai-step {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--sai-panel);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: #dcdcdc;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.4s ease,
    background 0.35s ease;
  overflow: hidden;
  isolation: isolate;
}
.searchai-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Active step (visible & not yet done): rotating conic border + soft purple halo */
.searchai-step.is-visible:not(.is-done) {
  background: transparent;
  box-shadow: 0 0 22px 1px rgba(var(--sai-spark-rgb), 0.22);
}
.searchai-step.is-visible:not(.is-done)::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background-image: conic-gradient(
    rgba(0, 0, 0, 0),
    var(--sai-spark),
    rgba(0, 0, 0, 0) 25%
  );
  animation: saiStepGlow 2.4s linear infinite;
  pointer-events: none;
}
.searchai-step.is-visible:not(.is-done)::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2px;
  background: var(--sai-panel);
  border-radius: inherit;
  pointer-events: none;
}
.searchai-step.is-done .searchai-step-dots {
  display: none;
}

@keyframes saiStepGlow {
  to {
    transform: translate(-50%, -50%) rotate(1turn);
  }
}
.searchai-step-dots {
  display: inline-flex;
  gap: 3px;
}
.searchai-step-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sai-muted);
  animation: saiDots 1.2s infinite ease-in-out;
}
.searchai-step-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.searchai-step-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes saiDots {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Results */
.searchai-results {
  margin-top: 18px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.searchai-results.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.searchai-media-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  width: 100%;
  aspect-ratio: 2 / 1;
  margin-bottom: 22px;
}
.searchai-media-grid--video-only {
  grid-template-columns: 1fr;
  aspect-ratio: 16 / 9;
}
.searchai-media-grid--video-only .searchai-media-video {
  width: 100%;
  height: 100%;
}
.searchai-media-video {
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.searchai-media-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.searchai-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.searchai-play::before {
  content: "";
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.searchai-play svg {
  position: relative;
}
.searchai-media-thumbs {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 0;
}
.searchai-media-thumbs img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Media grid responsive — placed AFTER the base rules so it wins the cascade */
@media (max-width: 720px) {
  .searchai-media-grid {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }
  .searchai-media-grid--video-only {
    aspect-ratio: auto;
  }
  .searchai-media-video {
    aspect-ratio: 16 / 10;
  }
  .searchai-media-grid--video-only .searchai-media-video {
    aspect-ratio: 16 / 9;
  }
  .searchai-media-thumbs {
    grid-template-rows: auto;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }
  .searchai-media-thumbs img {
    aspect-ratio: 1 / 1;
  }
}

/* WYSIWYG */
.searchai-wysiwyg {
  font-size: 15px;
  line-height: 1.55;
  color: #e4e4e4;
  max-width: 720px;
}
.searchai-wysiwyg h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 30px 0 6px;
}
.searchai-wysiwyg h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 14px 0 6px;
}
.searchai-wysiwyg p {
  margin: 0 0 8px;
}
.searchai-wysiwyg ul,
.searchai-wysiwyg ol {
  margin: 0 0 10px 18px;
  padding: 0;
}
.searchai-wysiwyg li {
  margin: 0 0 6px;
}
.searchai-wysiwyg a {
  color: #ffffff;
  text-decoration: underline;
  transition: color 0.25s ease;
}
.searchai-wysiwyg a:hover {
  color: var(--sai-spark);
}

/* Disclaimer — fades content out behind it via a vertical gradient */
.searchai-disclaimer {
  position: relative;
  text-align: center;
  font-size: 12px;
  color: var(--sai-muted);
  pointer-events: none;
  padding: 70px 16px 14px;
  background: linear-gradient(
    to bottom,
    rgba(var(--sai-bg-rgb), 0) 0%,
    rgba(var(--sai-bg-rgb), 0.75) 55%,
    var(--sai-bg) 100%
  );
}
/* On mobile/tablet the disclaimer flows in normal layout (no fixed/gradient) */
@media (max-width: 720px) {
  .searchai-shell {
    padding: 18px 24px 40px;
  }
  .searchai-disclaimer {
    position: relative;
    padding: 24px 16px 16px;
    background: none;
    margin-top: 30px;
  }
  /* Smaller answer icon + tighter gap, keep row layout */
  .searchai-answer {
    gap: 8px;
  }
  .searchai-answer-icon {
    width: 24px;
    height: 24px;
  }
  .searchai-answer-icon svg {
    width: 16px;
    height: 16px;
  }
}
.searchai-help {
  position: fixed;
  right: 18px;
  bottom: 14px;
  color: var(--sai-muted);
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 4px;
  border-radius: 50%;
  z-index: 10000;
  transition: color 0.2s ease;
}
.searchai-help:hover {
  color: var(--sai-text);
}
.searchai-help::before {
  content: "Privacy policy";
  position: absolute;
  right: calc(100% + 10px);
  bottom: 50%;
  transform: translateY(50%);
  white-space: nowrap;
  background: var(--sai-panel);
  color: var(--sai-text);
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.searchai-help:hover::before,
.searchai-help:focus-visible::before {
  opacity: 1;
}

/* Lightbox */
.searchai-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.searchai-lightbox-inner {
  width: min(900px, 100%);
}
.searchai-lightbox video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #000;
}
.searchai-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.searchai-submit svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
}
