/* ═══════════════════════════════════════════════════════════════
   Suprance — /estimate/ standalone page
   Lovable-style "describe your idea" homepage.
   Minimal chrome, centered hero, big rounded textarea.
   ═══════════════════════════════════════════════════════════════ */

.estimate-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ────── Cosmic gradient backdrop — sits beneath the 3D scene ────── */
.estimate-bg {
  position: fixed;
  inset: -10% -10% -10% -10%;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 25% 20%, rgba(108, 92, 231, 0.28) 0%, transparent 60%),
    radial-gradient(55% 45% at 80% 30%, rgba(0, 184, 148, 0.14) 0%, transparent 60%),
    radial-gradient(70% 60% at 50% 90%, rgba(162, 155, 254, 0.18) 0%, transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.85;
}

/* ────── 3D scene host — full-viewport fixed; hero.js sizes off parent ────── */
.estimate-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.estimate-stage > canvas#heroCanvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Soft vignette so the input card still reads against bright planet pixels */
.estimate-fade {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 60%, rgba(10, 10, 15, 0.55) 0%, rgba(10, 10, 15, 0) 70%),
    linear-gradient(180deg, rgba(10, 10, 15, 0.35) 0%, rgba(10, 10, 15, 0) 25%, rgba(10, 10, 15, 0) 65%, rgba(10, 10, 15, 0.55) 100%);
}

/* ────── Minimal nav ────── */
.estimate-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.estimate-nav .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.estimate-nav__cta {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 160ms;
}
.estimate-nav__cta:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

/* ────── Centered hero ────── */
.estimate-main {
  position: relative;
  z-index: 15;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vh, 2rem) 1.5rem;
  min-height: 0;
}
.estimate-wrap {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

/* ────── Title — bold, centered, with the same dark halo as main hero ────── */
.estimate-title {
  position: relative;
  font-size: clamp(2rem, min(7vw, 7vh), 4.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 clamp(1.2rem, 3.5vh, 2.4rem);
  padding: clamp(0.4rem, 1.5vh, 1rem) 0.5rem;
  /* Diagonal text fill: brightest top-left → dimmest bottom-right.
     -webkit-text-fill-color clips the gradient to the glyphs. */
  background: linear-gradient(135deg,
    #ffffff 0%,
    #f2f2f7 55%,
    #d4d4dc 100%
  );
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* Light dark-halo for separation from the scene — kept subtle */
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.30));
}
/* Soft, lightly tinted plate behind the title — barely-there now */
.estimate-title::before {
  content: '';
  position: absolute;
  inset: -0.5rem -1.5rem;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 65% 75% at 50% 50%,
    rgba(10, 10, 15, 0.28) 0%,
    rgba(10, 10, 15, 0.14) 45%,
    rgba(10, 10, 15, 0) 78%
  );
}

/* ════════ INPUT BOX — clean dark card with an animated gradient border ════════
   Goal: the rotating green→violet shimmer lives ONLY on the 1.5px border ring.
   The interior is a flat dark surface, no glow, no bleed, no inner ring on focus,
   and no colored button bubble inside.

   Technique: @property animates --halo-angle for a conic-gradient drawn on
   border-box, while a flat dark layer is drawn on padding-box on top of it.
   The 1.5px transparent border is the only place the gradient is visible. */
@property --halo-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.estimate-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 0.5rem 0.55rem 0.5rem 0.85rem;
  background:
    linear-gradient(#13131c, #13131c) padding-box,
    conic-gradient(
      from var(--halo-angle),
      #00b894,
      #55efc4 25%,
      #a29bfe 45%,
      #6c5ce7 60%,
      #55efc4 80%,
      #00b894
    ) border-box;
  animation: halo-spin 5s linear infinite;
  transition: padding 200ms ease;
}
.estimate-box:focus-within { animation-duration: 2.4s; }

@keyframes halo-spin {
  to { --halo-angle: 360deg; }
}

/* Multi-line state: gentle radius bump, otherwise identical */
.estimate-box.is-multiline {
  border-radius: 20px;
  padding: 0.8rem 0.65rem 0.8rem 0.85rem;
  align-items: flex-end;
}

/* Logo mark — flat, no glow */
.estimate-spark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.estimate-box.is-multiline .estimate-spark { padding-bottom: 6px; }

/* Textarea — transparent, no decoration */
.estimate-input {
  flex: 1 1 auto;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.55;
  resize: none;
  outline: none;
  padding: 0.4rem 0;
  margin: 0;
  max-height: 220px;
  overflow-y: auto;
}
.estimate-input::placeholder { color: rgba(255, 255, 255, 0.4); }

/* Kill the global *:focus-visible violet ring inside the estimate box —
   the rotating gradient border IS the focus indicator here. */
.estimate-input:focus,
.estimate-input:focus-visible,
.estimate-send:focus,
.estimate-send:focus-visible {
  outline: none;
  box-shadow: none;
  border-radius: inherit;
}

/* Send button — flat dark, blends with interior; only the icon shows */
.estimate-send {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.estimate-send:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.estimate-send:active:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.estimate-send:disabled {
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

/* Fallback — browsers without @property get a static greenish border, no animation */
@supports not (background: conic-gradient(from var(--halo-angle), red, blue)) {
  .estimate-box {
    animation: none;
    background: #13131c;
    border-color: rgba(0, 184, 148, 0.5);
  }
}

/* ────── Footer hint + error ────── */
.estimate-foot {
  margin-top: clamp(0.9rem, 2.5vh, 1.6rem);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.estimate-error {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 8px;
  color: #ff8080;
  font-size: 0.85rem;
}

.estimate-attrib {
  position: relative;
  flex: 0 0 auto;
  text-align: center;
  margin: 0 auto;
  padding: clamp(0.6rem, 1.8vh, 1.2rem) 1rem clamp(0.8rem, 2vh, 1.4rem);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.38);
  z-index: 2;
}
.estimate-attrib span { color: rgba(255, 255, 255, 0.62); }

/* ────── Recent estimates list ────── */
.recent-estimates {
  margin: clamp(1.4rem, 4vh, 2.4rem) auto 0;
  max-width: 560px;
  text-align: left;
}
.recent-estimates__title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
}
.recent-estimates__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.recent-estimates__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  background: rgba(20, 20, 30, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.recent-estimates__row:hover {
  background: rgba(28, 28, 40, 0.7);
  border-color: rgba(162, 155, 254, 0.25);
  transform: translateY(-1px);
}
.recent-estimates__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.recent-estimates__name {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-estimates__meta {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.4);
}
.recent-estimates__price {
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c4baff;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .recent-estimates { max-width: 100%; }
  .recent-estimates__row { padding: 0.65rem 0.8rem; }
  .recent-estimates__name { font-size: 0.88rem; }
  .recent-estimates__price { font-size: 0.82rem; }
}

/* ────── Clarifying-questions panel ────── */
.estimate-questions {
  margin: 0 auto;
  max-width: 720px;
  text-align: left;
  background: rgba(20, 20, 30, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: estimate-questions-in 220ms ease;
}
@keyframes estimate-questions-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.estimate-questions__head {
  margin-bottom: 1.1rem;
  text-align: center;
}
.estimate-questions__step {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: rgba(108, 92, 231, 0.18);
  border: 1px solid rgba(162, 155, 254, 0.3);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4baff;
}
.estimate-questions__sub {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
.estimate-questions__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.estimate-questions__row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.estimate-questions__q {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
}
.estimate-questions__a {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  resize: none;
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}
.estimate-questions__a:focus {
  border-color: rgba(162, 155, 254, 0.55);
  background: rgba(255, 255, 255, 0.06);
}
.estimate-questions__a::placeholder { color: rgba(255, 255, 255, 0.3); }
.estimate-questions__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}
.estimate-questions__skip {
  background: none;
  border: none;
  padding: 0.55rem 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 140ms ease;
}
.estimate-questions__skip:hover:not(:disabled) { color: rgba(255, 255, 255, 0.85); }
.estimate-questions__skip:disabled { opacity: 0.5; cursor: default; }
.estimate-questions__continue {
  padding: 0.65rem 1.3rem;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: opacity 140ms ease, transform 140ms ease;
}
.estimate-questions__continue:hover:not(:disabled) { transform: translateY(-1px); }
.estimate-questions__continue:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 560px) {
  .estimate-questions { padding: 1.2rem 1.1rem 1.1rem; border-radius: 14px; }
  .estimate-questions__actions { flex-direction: column-reverse; align-items: stretch; }
  .estimate-questions__continue, .estimate-questions__skip { width: 100%; text-align: center; }
}

/* ────── Short viewports — collapse vertical chrome ────── */
@media (max-height: 720px) {
  .estimate-nav { padding: 0.75rem 1.5rem; }
  .estimate-title { font-size: clamp(1.8rem, 5.5vw, 2.8rem); margin-bottom: clamp(0.9rem, 2vh, 1.4rem); padding: 0.4rem 0.5rem; }
  .estimate-foot { margin-top: clamp(0.7rem, 1.5vh, 1rem); }
  .estimate-attrib { font-size: 0.72rem; padding: 0.4rem 1rem 0.6rem; }
}
@media (max-height: 560px) {
  .estimate-title { font-size: 1.6rem; margin-bottom: 0.8rem; padding: 0.2rem 0.4rem; }
  .estimate-foot { display: none; }
}

/* ────── Narrow screens ────── */
@media (max-width: 640px) {
  .estimate-nav { padding: 1rem 1.25rem; }
  .estimate-main { padding: clamp(0.8rem, 2.5vh, 1.4rem) 1.25rem; }
  .estimate-title { font-size: clamp(1.9rem, 8vw, 2.6rem); margin-bottom: clamp(1rem, 2.5vh, 1.6rem); }
  .estimate-box { padding: 0.5rem 0.5rem 0.5rem 1rem; }
  .estimate-input { font-size: 0.95rem; }
  .estimate-send { width: 34px; height: 34px; }
}
