/* ======================================================================
   FLOATING DEMO WIDGET — site-wide, persistent access to the demo-request
   form. Supplements (does not replace) the homepage's inline final-CTA
   section — for visitors who've scrolled past it, or are on a page that
   doesn't have one.
   ====================================================================== */

.dw-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(158, 145, 96, 0.4);
  border-radius: 50%;
  background: linear-gradient(180deg, #d9cfae 0%, var(--accent-1) 100%);
  color: var(--accent-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 34px -10px rgba(15, 45, 73, 0.5);
  cursor: pointer;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-fab:hover {
  background: linear-gradient(180deg, #e8e0c4 0%, #ded2a9 100%);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 18px 40px -10px rgba(15, 45, 73, 0.55);
}

.dw-fab:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.dw-fab svg {
  width: 24px;
  height: 24px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-fab[aria-expanded="true"] .dw-fab-icon-open {
  display: none;
}

.dw-fab:not([aria-expanded="true"]) .dw-fab-icon-close {
  display: none;
}

/* Quiet pulse ring, only while the widget hasn't been opened yet */
.dw-fab-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(204, 191, 147, 0.55);
  animation: dw-pulse 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  pointer-events: none;
}

.dw-fab.dw-fab--seen .dw-fab-ring {
  display: none;
}

@keyframes dw-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dw-fab-ring {
    animation: none;
    display: none;
  }
}

/* --- Backdrop + panel --- */
.dw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(9, 25, 41, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dw-panel {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 96;
  width: min(430px, calc(100vw - 40px));
  max-height: calc(100vh - 110px);
  overflow: hidden;
  padding: 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, #17395a 0%, #123252 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 26px 80px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 250ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (max-width: 479px) {
  .dw-panel {
    right: 12px;
    left: 12px;
    bottom: 88px;
    width: auto;
  }
}

.dw-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition:
    background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-panel-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.dw-panel-close svg {
  width: 15px;
  height: 15px;
}

.dw-panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 40px 14px 0;
}

.dw-panel-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.58);
}

.dw-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.dw-panel-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.58);
}

/* --- Progress dots --- */
.dw-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 180px;
  margin: 0;
}

.dw-progress-dot {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition:
    background-color 250ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-progress-dot.is-active,
.dw-progress-dot.is-done {
  background: linear-gradient(90deg, #d9cfae 0%, #efe6ca 100%);
}

.dw-progress-dot.is-active {
  transform: scaleY(1.05);
}

/* --- Steps --- */
.dw-step[hidden] {
  display: none;
}

.dw-step {
  animation: dw-step-in 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dw-step-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dw-step {
    animation: none;
  }
}

/* --- Interest chips (step 1) --- */
.dw-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.dw-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  min-height: 64px;
  padding: 14px 14px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(39, 67, 95, 0.9) 0%, rgba(33, 60, 87, 0.95) 100%);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  line-height: 1.3;
  color: #fff;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-chip--full {
  grid-column: 1 / -1;
}

.dw-chip:hover {
  border-color: rgba(204, 191, 147, 0.38);
  background: linear-gradient(180deg, rgba(43, 72, 101, 0.98) 0%, rgba(35, 63, 91, 1) 100%);
  box-shadow: 0 14px 30px rgba(5, 20, 35, 0.2);
  transform: translateY(-1px);
}

.dw-chip[aria-checked="true"] {
  border-color: rgba(217, 207, 174, 0.95);
  background: linear-gradient(180deg, rgba(46, 75, 104, 0.98) 0%, rgba(39, 67, 95, 1) 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(4, 18, 32, 0.18);
}

.dw-chip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.dw-chip-title {
  display: block;
  padding-right: 42px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}

.dw-chip[aria-checked="true"] .dw-chip-title {
  color: var(--accent-1);
}

.dw-chip-check {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(204, 191, 147, 0.18);
  color: rgba(204, 191, 147, 0.7);
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 200ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-chip-check svg {
  width: 15px;
  height: 15px;
}

.dw-chip[aria-checked="true"] .dw-chip-check {
  background: linear-gradient(180deg, #e2d09e 0%, #ccbf93 100%);
  color: #17395a;
  opacity: 1;
  transform: scale(1);
}

/* --- Standard stacked fields (step 2) --- */
.dw-field {
  margin-top: 15px;
}

.dw-field:first-child {
  margin-top: 0;
}

.dw-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.68);
}

.dw-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 249, 252, 0.92) 100%);
  font-family: var(--font-body);
  font-size: 14px;
  transition:
    box-shadow 200ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background 200ms cubic-bezier(0.22, 1, 0.36, 1);
  color: #123252;
}

.dw-field input::placeholder {
  color: rgba(18, 50, 82, 0.38);
}

.dw-field input:hover {
  border-color: rgba(255, 255, 255, 0.42);
}

.dw-field input:focus {
  outline: none;
  border-color: var(--accent-1);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 0 0 3px rgba(204, 191, 147, 0.14);
}

.dw-field input.dw-invalid {
  border-color: #e2896b;
}

.dw-chip-grid.dw-invalid {
  outline: 1px solid #e2896b;
  outline-offset: 5px;
  border-radius: 12px;
}

/* --- Step actions --- */
.dw-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.dw-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-back:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dw-back svg {
  width: 14px;
  height: 14px;
}

.dw-panel-submit,
.dw-panel-next {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #f2f5f8 100%);
  color: var(--accent-2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(3, 18, 31, 0.16);
  cursor: pointer;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-step-actions .dw-panel-submit {
  margin-top: 0;
}

.dw-panel-submit:hover {
  background: linear-gradient(180deg, #ffffff 0%, #ece2c1 100%);
  box-shadow: 0 14px 30px rgba(3, 18, 31, 0.22);
  transform: translateY(-2px);
}

.dw-panel-next:hover {
  background: linear-gradient(180deg, #ffffff 0%, #ece2c1 100%);
  box-shadow: 0 14px 30px rgba(3, 18, 31, 0.22);
  transform: translateY(-2px);
}

.dw-panel-submit svg {
  width: 14px;
  height: 14px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-panel-next svg {
  width: 14px;
  height: 14px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dw-panel-submit:hover svg {
  transform: translateX(3px);
}

.dw-panel-next:hover svg {
  transform: translateX(3px);
}

/* Prevents a double lead submission on a slow connection — the button
   stays visibly pressed while the full-page POST is in flight. */
.dw-panel-submit:disabled {
  cursor: default;
  opacity: 0.75;
  transform: none !important;
}

.dw-panel-submit.is-loading svg {
  animation: dw-spin 900ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .dw-panel-submit.is-loading svg {
    animation: none;
  }
}

.dw-panel-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 479px) {
  .dw-chip-grid {
    grid-template-columns: 1fr;
  }

  .dw-panel {
    bottom: 84px;
    max-height: calc(100vh - 96px);
    padding: 18px 14px 14px;
  }

  .dw-panel-topline {
    margin: 0 36px 12px 0;
  }

  .dw-step-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dw-back,
  .dw-panel-submit {
    width: 100%;
    justify-content: center;
  }
}

/* ======================================================================
   FORM SUCCESS MODAL — confirmation shown after any site form (contact,
   demo widget, newsletter) submits successfully via the shared
   session('form_success') flash. Reuses the brand's navy/gold language
   instead of a flat, generic alert box.
   ====================================================================== */

.fsm-backdrop {
  animation: fsm-backdrop-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fsm-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fsm-card {
  overflow: hidden;
  animation: fsm-card-in 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fsm-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fsm-backdrop,
  .fsm-card {
    animation: none;
  }
}

.fsm-rule {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-1), #8f7434);
}

/* Error variant — same card, a muted red top rule instead of gold, used
   by the validation-error modal (#form-error-modal) so a failed form
   never shoves the whole page down like a full-width banner would. */
.fsm-rule--error {
  background: linear-gradient(90deg, #c0392b, #7a241c);
}

.fsm-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e2d09e 0%, var(--accent-1) 100%);
  color: var(--accent-2);
  box-shadow: 0 10px 26px -8px rgba(204, 191, 147, 0.6);
}

.fsm-icon--error {
  background: linear-gradient(180deg, #f0c9c2 0%, #d17a6c 100%);
  color: #7a241c;
  box-shadow: 0 10px 26px -8px rgba(192, 57, 43, 0.45);
}

/* One-shot expanding ring on arrival — celebratory without looping
   forever like the FAB's pulse (this modal isn't meant to keep asking
   for attention once it's already been seen). */
.fsm-icon-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(204, 191, 147, 0.6);
  animation: fsm-ring-pop 900ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
}

.fsm-icon-ring--error {
  border-color: rgba(192, 57, 43, 0.5);
}

@keyframes fsm-ring-pop {
  from {
    transform: scale(0.8);
    opacity: 0.7;
  }
  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fsm-icon-ring {
    animation: none;
    display: none;
  }
}

.fsm-title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--accent-2);
}

.fsm-body {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(15, 45, 73, 0.66);
}

.fsm-body--list {
  padding-left: 18px;
  list-style: disc;
}

.fsm-body--list li + li {
  margin-top: 4px;
}

.fsm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(15, 45, 73, 0.08);
}

.fsm-footer-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12.5px;
  color: rgba(15, 45, 73, 0.45);
}

.fsm-footer-note svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: rgba(15, 45, 73, 0.35);
}

.fsm-close-btn {
  flex: none;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgba(158, 145, 96, 0.4);
  border-radius: 11px;
  background: linear-gradient(180deg, #d9cfae 0%, var(--accent-1) 100%);
  color: var(--accent-2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 250ms cubic-bezier(0.22, 1, 0.36, 1),
    background 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fsm-close-btn:hover {
  background: linear-gradient(180deg, #e8e0c4 0%, #ded2a9 100%);
  transform: translateY(-1px);
}

.fsm-close-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

@media (max-width: 479px) {
  .fsm-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .fsm-close-btn {
    width: 100%;
  }
}
