/* stage-6-quote-dock-layer */

:root {
  --focus-quote-control-size: 38px;
  --focus-quote-dot-size: 22px;
}

.quote-dock {
  position: relative;
  display: grid !important;
  grid-template-columns: var(--focus-quote-control-size) minmax(0, 1fr) var(--focus-quote-control-size) !important;
  align-items: center;
  gap: 12px !important;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--glass-border) 86%, transparent) !important;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 16rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 80%, transparent), color-mix(in srgb, var(--glass-surface) 94%, transparent)) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--focus-shadow), inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent) !important;
}

.quote-dock::before {
  content: "";
  position: absolute;
  inset: 10px 56px;
  z-index: -1;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 12%, transparent), transparent),
    color-mix(in srgb, var(--glass-surface) 42%, transparent);
  opacity: 0.7;
}

.quote-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.quote-dock strong {
  display: block !important;
  color: var(--text-secondary) !important;
  font-size: 0.74rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.02em !important;
  line-height: 1;
  text-transform: none !important;
}

.quote-window {
  min-width: 0;
  overflow: hidden;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

.quote-window p {
  display: block !important;
  width: auto !important;
  max-width: 100%;
  margin: 0;
  color: var(--text-primary) !important;
  font-size: clamp(0.94rem, 1.1vw, 1.04rem);
  font-weight: 560;
  line-height: 1.32;
  white-space: normal !important;
  transform: none !important;
  animation: none !important;
  will-change: auto !important;
}

.quote-window p span {
  display: none !important;
}

.quote-window p.is-changing {
  animation: quoteSoftChange 320ms cubic-bezier(.2, .8, .2, 1) both !important;
}

.quote-nav {
  width: var(--focus-quote-control-size);
  height: var(--focus-quote-control-size);
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--glass-border) 92%, transparent);
  border-radius: 999px;
  color: var(--text-primary);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 58%, transparent), color-mix(in srgb, var(--glass-surface) 88%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(.2, .8, .2, 1),
    border-color 220ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 220ms cubic-bezier(.2, .8, .2, 1),
    background 220ms cubic-bezier(.2, .8, .2, 1);
}

.quote-nav span {
  display: block;
  transform: translateY(-1px);
  font-size: 1.45rem;
  line-height: 1;
}

.quote-nav:hover,
.quote-nav:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 54%, var(--glass-border));
  box-shadow:
    0 10px 28px color-mix(in srgb, var(--primary) 14%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 24%, transparent);
  outline: none;
}

.quote-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 12px;
}

.quote-dot {
  width: var(--focus-quote-dot-size);
  height: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: color-mix(in srgb, var(--text-secondary) 28%, transparent);
  cursor: pointer;
  opacity: 0.78;
  transition:
    width 220ms cubic-bezier(.2, .8, .2, 1),
    background 220ms cubic-bezier(.2, .8, .2, 1),
    opacity 220ms cubic-bezier(.2, .8, .2, 1),
    transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.quote-dot:hover,
.quote-dot:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  outline: none;
}

.quote-dot.is-active {
  width: calc(var(--focus-quote-dot-size) + 10px);
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 72%, var(--yellow)));
  opacity: 1;
}

@keyframes quoteSoftChange {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .quote-dock {
    --focus-quote-control-size: 36px;
    grid-template-columns: var(--focus-quote-control-size) minmax(0, 1fr) var(--focus-quote-control-size) !important;
    gap: 10px !important;
    min-height: 64px !important;
    padding: 12px !important;
  }

  .quote-dock::before {
    inset: 8px 48px;
  }

  .quote-dock strong {
    font-size: 0.72rem !important;
  }

  .quote-window p {
    font-size: 0.92rem;
    line-height: 1.28;
  }
}

@media (max-width: 480px) {
  .quote-dock {
    --focus-quote-control-size: 34px;
    gap: 8px !important;
    min-height: 78px !important;
  }

  .quote-body {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 5px;
  }

  .quote-dock strong {
    display: none !important;
  }

  .quote-window p {
    display: -webkit-box !important;
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1.24;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .quote-dots {
    justify-content: center;
  }

  .quote-dot {
    width: 16px;
  }

  .quote-dot.is-active {
    width: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote-window p,
  .quote-window p.is-changing,
  .quote-nav,
  .quote-dot {
    transition: none !important;
    animation: none !important;
  }
}
