/* Ask-carpet: white light-band panel with icon carpet + NL workflow carousel */

.icon-carpet-canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* Scroll-driven only — keep page scroll + pinch-zoom over the canvas. */
  touch-action: pan-y pinch-zoom;
}

.ask-carpet {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: #fff;
  color: var(--foreground);
}

.ask-carpet__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ask-carpet__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      #ffffff 0%,
      rgba(255, 255, 255, 0.92) 12%,
      rgba(255, 255, 255, 0.35) 32%,
      rgba(255, 255, 255, 0) 48%
    ),
    linear-gradient(
      to top,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0) 28%
    );
}

.ask-carpet__overlay {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--header-height, 4.5rem) + 1.75rem) 1.25rem 2.5rem;
  pointer-events: none;
}

.ask-carpet__overlay > * {
  pointer-events: auto;
}

.ask-carpet__header {
  width: min(40rem, 100%);
  margin: 0 0 1.35rem;
  text-align: center;
  flex-shrink: 0;
}

.ask-carpet__header h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.ask-carpet__header p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--foreground-diminished, rgba(42, 42, 42, 0.6));
}

.ask-carpet__stage-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(42rem, 100%);
  flex-shrink: 0;
}

.ask-carpet__query {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0.85rem 2.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.ask-carpet__query.is-active {
  border-color: rgba(40, 140, 239, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 32px rgba(40, 140, 239, 0.12);
}

.ask-carpet__query-icon {
  position: absolute;
  right: 1.1rem;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.45;
  filter: brightness(0);
  pointer-events: none;
}

.ask-carpet__query-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 1.4em;
}

.ask-carpet__placeholder {
  position: absolute;
  inset: 0;
  margin: 0;
  color: rgba(42, 42, 42, 0.4);
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ask-carpet__placeholder[hidden] {
  display: none;
}

.ask-carpet__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: #1a1a1a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ask-carpet__cursor {
  display: none;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  background: #288cef;
  flex-shrink: 0;
  animation: ask-carpet-blink 0.9s steps(1) infinite;
}

.ask-carpet__cursor.is-on {
  display: block;
}

@keyframes ask-carpet-blink {
  50% {
    opacity: 0;
  }
}

.ask-carpet__card {
  margin: auto 0;
  width: min(26rem, 100%);
  padding: 1.4rem 1.5rem 1.5rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 48px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.ask-carpet__card-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(42, 42, 42, 0.45);
}

.ask-carpet__card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #1a1a1a;
}

.ask-carpet__card p:last-child {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--foreground-diminished, rgba(42, 42, 42, 0.65));
}

@media (max-width: 640px) {
  .ask-carpet__overlay {
    padding-inline: 1rem;
    padding-bottom: 1.5rem;
  }

  .ask-carpet__header h2 {
    font-size: 1.5rem;
  }

  .ask-carpet__header p,
  .ask-carpet__text,
  .ask-carpet__placeholder {
    font-size: 0.95rem;
  }

  .ask-carpet__card {
    padding: 1.2rem 1.2rem 1.25rem;
  }

  .ask-carpet__card h3 {
    font-size: 1.15rem;
  }

  .ask-carpet__cursor {
    animation: none;
  }
}

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

  .ask-carpet__query {
    transition: none;
  }
}
