/*
 * IESYS Labs — Aurora V2.4 Electric Quote
 * Target: #orcamento .quote-shell / .quote-copy / .quote-form
 * Loaded after Aurora V2.3.
 */

:root {
  --quote-electric-blue: #2f80ed;
  --quote-electric-cyan: #62c7ff;
  --quote-electric-deep: #0a5cff;
  --quote-electric-glow: rgba(47, 128, 237, .28);
  --quote-charge: .18;
}

html[data-theme="light"] {
  --quote-panel-bg:
    radial-gradient(circle at 84% 18%, rgba(47,128,237,.08), transparent 23rem),
    linear-gradient(145deg, #ffffff, #f3f7fc);
  --quote-panel-line: rgba(45, 74, 111, .18);
  --quote-form-bg: rgba(255,255,255,.91);
  --quote-form-text: #111b2b;
  --quote-form-muted: #5a6678;
  --quote-input-bg: #ffffff;
  --quote-input-line: rgba(36, 61, 92, .19);
  --quote-input-text: #172236;
  --quote-input-placeholder: #8b96a7;
  --quote-label: #243248;
  --quote-electric-blue: #1677ff;
  --quote-electric-cyan: #4abaff;
  --quote-electric-deep: #005ee8;
  --quote-electric-glow: rgba(22, 119, 255, .25);
}

html[data-theme="dark"] {
  --quote-panel-bg:
    radial-gradient(circle at 82% 16%, rgba(47,128,237,.10), transparent 24rem),
    linear-gradient(145deg, #0a111c, #080d15);
  --quote-panel-line: rgba(126, 168, 220, .17);
  --quote-form-bg: rgba(12,18,28,.87);
  --quote-form-text: #eef4fb;
  --quote-form-muted: #9eacbf;
  --quote-input-bg: rgba(255,255,255,.035);
  --quote-input-line: rgba(134, 174, 220, .17);
  --quote-input-text: #f4f8fd;
  --quote-input-placeholder: #8190a5;
  --quote-label: #d9e6f4;
  --quote-electric-blue: #3797ff;
  --quote-electric-cyan: #73d2ff;
  --quote-electric-deep: #176dff;
  --quote-electric-glow: rgba(55, 151, 255, .34);
}

/* ===============================================================
   Outer shell
   =============================================================== */

#orcamento .quote-shell {
  --quote-charge: .18;
  position: relative !important;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--quote-panel-line) !important;
  background: var(--quote-panel-bg) !important;
  box-shadow:
    0 28px 80px rgba(23, 42, 67, .10),
    inset 0 1px rgba(255,255,255,.50) !important;
}

html[data-theme="dark"] #orcamento .quote-shell {
  box-shadow:
    0 32px 96px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.035) !important;
}

/* Preserve actual content above the base panel and below the electric overlay. */
#orcamento .quote-copy,
#orcamento .quote-form {
  position: relative;
  z-index: 2;
}

/* ===============================================================
   Left editorial panel
   =============================================================== */

html[data-theme="light"] #orcamento .quote-copy {
  color: #f7fbff !important;
  border: 1px solid rgba(104, 167, 255, .20) !important;
  background:
    radial-gradient(circle at 84% 20%, rgba(47,128,237,.34), transparent 19rem),
    radial-gradient(circle at 18% 88%, rgba(77,179,255,.11), transparent 17rem),
    linear-gradient(150deg, #0b2747, #071725 72%) !important;
  box-shadow:
    0 24px 70px rgba(15, 45, 80, .17),
    inset 0 1px rgba(255,255,255,.045);
}

html[data-theme="dark"] #orcamento .quote-copy {
  color: #f7fbff !important;
  border: 1px solid rgba(104, 167, 255, .17) !important;
  background:
    radial-gradient(circle at 84% 20%, rgba(47,128,237,.29), transparent 19rem),
    linear-gradient(150deg, #0b223c, #07131f 74%) !important;
}

#orcamento .quote-copy .eyebrow {
  color: #8ecaff !important;
}

#orcamento .quote-copy h2 {
  color: #f7fbff !important;
  text-shadow: 0 12px 44px rgba(0,0,0,.16);
}

#orcamento .quote-copy > div > p,
#orcamento .quote-copy p {
  color: #b9cce2 !important;
}

#orcamento .contact-pill {
  color: #edf6ff !important;
  border-color: rgba(125, 185, 238, .17) !important;
  background: rgba(255,255,255,.035) !important;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

#orcamento .contact-pill:hover {
  border-color: rgba(88, 187, 255, .35) !important;
  background: rgba(47,128,237,.08) !important;
}

#orcamento .contact-pill small {
  color: #93abc4 !important;
}

/* Tone down the legacy decorative circle so it doesn't fight the circuit. */
#orcamento .quote-copy::after {
  opacity: .42;
}

/* ===============================================================
   Light-form correction
   =============================================================== */

#orcamento .quote-form {
  color: var(--quote-form-text) !important;
  background: var(--quote-form-bg) !important;
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

html[data-theme="light"] #orcamento .quote-form {
  border-left: 1px solid rgba(52, 83, 119, .10);
}

html[data-theme="dark"] #orcamento .quote-form {
  border-left: 1px solid rgba(145, 178, 220, .08);
}

#orcamento .quote-form .eyebrow {
  color: var(--quote-electric-deep) !important;
}

html[data-theme="dark"] #orcamento .quote-form .eyebrow {
  color: #7cc7ff !important;
}

#orcamento .form-intro {
  color: var(--quote-form-muted) !important;
}

#orcamento .field label {
  color: var(--quote-label) !important;
  font-weight: 780 !important;
}

#orcamento .field input,
#orcamento .field select,
#orcamento .field textarea {
  color: var(--quote-input-text) !important;
  border: 1px solid var(--quote-input-line) !important;
  background: var(--quote-input-bg) !important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.55),
    0 1px 2px rgba(31, 49, 75, .025);
}

html[data-theme="dark"] #orcamento .field input,
html[data-theme="dark"] #orcamento .field select,
html[data-theme="dark"] #orcamento .field textarea {
  box-shadow: inset 0 1px rgba(255,255,255,.02);
}

#orcamento .field input::placeholder,
#orcamento .field textarea::placeholder {
  color: var(--quote-input-placeholder) !important;
  opacity: 1;
}

#orcamento .field select option {
  color: #111b2b !important;
  background: #ffffff !important;
}

#orcamento .field input:hover,
#orcamento .field select:hover,
#orcamento .field textarea:hover {
  border-color: color-mix(in srgb, var(--quote-electric-blue) 42%, var(--quote-input-line)) !important;
}

#orcamento .field input:focus,
#orcamento .field select:focus,
#orcamento .field textarea:focus {
  color: var(--quote-input-text) !important;
  border-color: var(--quote-electric-blue) !important;
  background: var(--quote-input-bg) !important;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--quote-electric-blue) 13%, transparent),
    0 8px 28px color-mix(in srgb, var(--quote-electric-blue) 10%, transparent) !important;
}

#orcamento .form-note {
  color: var(--quote-form-muted) !important;
}

#orcamento .form-status {
  color: color-mix(in srgb, var(--quote-electric-blue) 72%, var(--quote-form-text)) !important;
}

/* Gold CTA remains the terminal node of the electric path. */
#orcamento .form-actions .btn.primary {
  position: relative;
  box-shadow:
    0 12px 32px rgba(196, 151, 45, .16),
    0 0 calc(10px + 24px * var(--quote-charge))
      color-mix(in srgb, var(--quote-electric-blue) 16%, transparent);
}

/* ===============================================================
   Electric SVG overlay
   =============================================================== */

.iesys-quote-electric {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.iesys-quote-electric-base,
.iesys-quote-electric-halo,
.iesys-quote-electric-runner {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.iesys-quote-electric-base {
  stroke: color-mix(in srgb, var(--quote-electric-blue) 18%, transparent);
  stroke-width: 1;
}

.iesys-quote-electric-halo {
  stroke: var(--quote-electric-cyan);
  stroke-width: 3.4;
  opacity: calc(.07 + var(--quote-charge) * .10);
  filter: blur(4px);
}

.iesys-quote-electric-runner {
  stroke: url(#iesysQuoteElectricGradient);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-dasharray: 0.13 0.87;
  stroke-dashoffset: 0;
  opacity: calc(.52 + var(--quote-charge) * .40);
  filter:
    drop-shadow(0 0 3px var(--quote-electric-cyan))
    drop-shadow(0 0 9px var(--quote-electric-glow));
  animation: iesysQuoteRunner 6.2s linear infinite;
}

.iesys-quote-electric-node {
  fill: #eaf8ff;
  stroke: var(--quote-electric-cyan);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
  opacity: calc(.55 + var(--quote-charge) * .40);
  filter:
    drop-shadow(0 0 4px var(--quote-electric-cyan))
    drop-shadow(0 0 10px var(--quote-electric-glow));
}

.iesys-quote-spark {
  fill: none;
  stroke: var(--quote-electric-cyan);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  filter:
    drop-shadow(0 0 3px var(--quote-electric-cyan))
    drop-shadow(0 0 7px var(--quote-electric-glow));
}

.quote-shell.is-electric-active .iesys-quote-spark.s1 {
  animation: iesysQuoteSpark 3.9s ease-in-out .45s infinite;
}

.quote-shell.is-electric-active .iesys-quote-spark.s2 {
  animation: iesysQuoteSpark 4.8s ease-in-out 1.65s infinite;
}

.quote-shell.is-electric-active .iesys-quote-spark.s3 {
  animation: iesysQuoteSpark 5.5s ease-in-out 2.55s infinite;
}

.quote-shell.is-electric-focus .iesys-quote-electric-runner {
  stroke-width: 2.2;
  animation-duration: 4.5s;
  opacity: .96;
}

.quote-shell.is-electric-focus .iesys-quote-electric-halo {
  opacity: .21;
}

.quote-shell.is-electric-focus .iesys-quote-spark {
  animation-duration: 2.7s !important;
}

/* Additional local energy haze. */
#orcamento .quote-shell::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--quote-electric-blue) calc(4% + 5% * var(--quote-charge)), transparent), transparent 20rem),
    radial-gradient(circle at 86% 100%, color-mix(in srgb, var(--quote-electric-cyan) calc(3% + 5% * var(--quote-charge)), transparent), transparent 22rem);
}

/* Tiny top/bottom electrical rail visible even when the runner is elsewhere. */
#orcamento .quote-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px color-mix(in srgb, var(--quote-electric-cyan) 16%, transparent),
    inset 0 -1px color-mix(in srgb, var(--quote-electric-blue) 12%, transparent);
}

/* ===============================================================
   Animations
   =============================================================== */

@keyframes iesysQuoteRunner {
  to { stroke-dashoffset: -1; }
}

@keyframes iesysQuoteSpark {
  0%, 74%, 100% { opacity: 0; }
  78% { opacity: .18; }
  80% { opacity: .92; }
  82% { opacity: .22; }
  84% { opacity: .70; }
  88% { opacity: 0; }
}

/* ===============================================================
   Responsive
   =============================================================== */

@media (max-width: 980px) {
  html[data-theme] #orcamento .quote-form {
    border-left: 0;
    border-top: 1px solid var(--quote-panel-line);
  }
}

@media (max-width: 620px) {
  #orcamento .quote-shell {
    border-radius: 26px !important;
  }

  .iesys-quote-electric-runner {
    stroke-width: 1.55;
  }

  .iesys-quote-spark {
    stroke-width: 1.3;
  }
}

/* Accessibility: keep a static blue circuit, no moving electricity. */
@media (prefers-reduced-motion: reduce) {
  .iesys-quote-electric-runner,
  .iesys-quote-spark {
    animation: none !important;
  }

  .iesys-quote-electric-runner {
    stroke-dasharray: none;
    opacity: .48;
  }

  .iesys-quote-spark {
    opacity: 0 !important;
  }
}
