/* CampX speed dial — shared across HTML prototypes */

/* Floating dock: pill + speed dial + hint (scroll-hide via .is-collapsed) */
.campx-nav-dock {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  height: 210px;
  z-index: 50;
  pointer-events: none;
  transition:
    transform 0.34s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.28s ease,
    visibility 0s linear 0s;
}

.campx-nav-dock.is-collapsed {
  transform: translate3d(0, calc(100% + 28px), 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.34s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.22s ease,
    visibility 0s linear 0.36s;
}

.campx-nav-dock.is-collapsed .nav-pill,
.campx-nav-dock.is-collapsed .speed-dial-wrap,
.campx-nav-dock.is-collapsed .hold-hint {
  pointer-events: none !important;
}

.campx-nav-dock.is-dial-open {
  opacity: 1 !important;
  visibility: visible !important;
  transition: none;
}

/* Still hide/show when user prefers reduced motion — only skip long animations */
@media (prefers-reduced-motion: reduce) {
  .campx-nav-dock,
  .campx-nav-dock.is-collapsed {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

.dial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 40;
  pointer-events: none;
  transition: background 0.35s ease;
}
.dial-backdrop.open {
  background: rgba(0, 0, 0, 0.55);
  pointer-events: all;
}

.nav-pill {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(200px, calc(100% - 24px));
  max-width: 200px;
  height: 44px;
  border-radius: 22px;
  background: rgba(22, 22, 32, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
  user-select: none;
  touch-action: none;
  transition: width 0.2s, box-shadow 0.2s, transform 0.2s;
  pointer-events: auto;
}
.nav-pill:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.nav-pill.held {
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.4), 0 6px 28px rgba(108, 99, 255, 0.3);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #6c63ff);
  transition: transform 0.2s;
}
.nav-pill.held .pill-dot {
  transform: scale(1.3);
}

.pill-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub, rgba(240, 240, 248, 0.6));
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.2s;
}

@media (min-width: 768px) {
  .pill-label {
    font-size: 13px;
  }
}
.nav-pill.held .pill-label {
  color: var(--accent, #6c63ff);
}

.pill-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.pill-arrows span {
  display: block;
  width: 10px;
  height: 1.5px;
  background: var(--text-muted, rgba(240, 240, 248, 0.38));
  border-radius: 1px;
  transition: background 0.2s, transform 0.2s;
}
.nav-pill.held .pill-arrows span {
  background: var(--accent, #6c63ff);
}
.nav-pill.held .pill-arrows span:first-child {
  transform: translateY(1px);
}
.nav-pill.held .pill-arrows span:last-child {
  transform: translateY(-1px);
}

.speed-dial-wrap {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  pointer-events: none;
  width: min(320px, 100vw - 48px);
  height: 200px;
}

.dial-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.4);
  transition:
    opacity 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dial-item.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: all;
}

.dial-item.active-nav .dial-btn {
  background: var(--accent, #6c63ff);
  border-color: rgba(108, 99, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.25), 0 6px 20px rgba(108, 99, 255, 0.4);
}
.dial-item.active-nav .dial-btn svg {
  stroke: white;
}

.dial-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(28, 28, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.dial-btn:hover {
  background: rgba(108, 99, 255, 0.25);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.3);
}
.dial-btn:active {
  transform: scale(0.95);
}
.dial-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-sub, rgba(240, 240, 248, 0.6));
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dial-lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--text, #f0f0f8);
  font-family: "DM Sans", sans-serif;
  white-space: nowrap;
  background: rgba(13, 13, 20, 0.85);
  padding: 3px 8px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hold-hint {
  position: absolute;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.hold-hint.visible {
  opacity: 1;
}

.screen-chip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%) translateY(-8px);
  background: rgba(108, 99, 255, 0.2);
  border: 1px solid rgba(108, 99, 255, 0.4);
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11px;
  color: #a89fff;
  font-family: "DM Sans", sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.speed-dial-wrap.open .screen-chip {
  opacity: 1;
}

.pill-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
