/* ========================================================
   VAM BIKE — FLOATING INTERACTIVE OBJECTS & WINDOWS
   Aesthetic aligned with mockup: media_1792721986100.png
   ======================================================== */

/* SVG Layer for Leader Lines between Anchor and Window */
#floating-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.floating-leader-line {
  stroke: #00f2fe;
  stroke-width: 2;
  stroke-dasharray: 4, 3;
  fill: none;
  filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.7));
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.floating-leader-line.active {
  stroke: #00ff88;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.9));
  opacity: 1;
}

/* 1. Geographic Anchor Marker */
.floating-anchor-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  transition: transform 0.15s ease;
}

.floating-anchor-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0d1117;
  border: 2.5px solid #00f2fe;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.75), inset 0 0 4px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.floating-anchor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.floating-anchor-fallback {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.floating-anchor-dot:hover {
  transform: scale(1.18);
  box-shadow: 0 0 22px #00f2fe, 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Master Account Mode: Anchor can be dragged */
.floating-anchor-container.master-edit-mode {
  cursor: grab !important;
}

.floating-anchor-container.master-edit-mode .floating-anchor-dot {
  border-style: dashed;
  border-width: 2.5px;
  border-color: #00ff88 !important;
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.85);
}

.floating-anchor-container.dragging {
  cursor: grabbing !important;
  z-index: 200;
}

.floating-anchor-container.dragging .floating-anchor-dot {
  transform: scale(1.22);
  border-color: #00ff88 !important;
  box-shadow: 0 0 28px rgba(0, 255, 136, 1), 0 0 14px #ffffff;
}

.floating-anchor-label {
  display: flex;
  flex-direction: column;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.85);
}

.floating-anchor-label-sub {
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}

.floating-anchor-label-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

/* 2. Floating Interactive Window */
.vam-floating-window {
  position: absolute;
  min-width: 220px;
  max-width: 290px;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 16px rgba(0, 242, 254, 0.2);
  color: #ffffff;
  font-family: inherit;
  user-select: none;
  pointer-events: auto;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  z-index: 100;
}

/* Master Account Mode: Dashed border matching user mockup */
.vam-floating-window.master-edit-mode {
  border: 1.5px dashed rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 255, 136, 0.3);
}

.vam-floating-window.dragging {
  cursor: grabbing !important;
  opacity: 0.92;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 255, 136, 0.6);
  transform: scale(1.02);
}

/* Floating Window Header Bar */
.floating-window-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.floating-drag-handle {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #e2e8f0;
  font-weight: 700;
  cursor: grab;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, color 0.15s ease;
}

.floating-drag-handle:hover {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
}

.floating-close-btn {
  color: #8b949e;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.floating-close-btn:hover {
  color: #ff3366;
  background: rgba(255, 51, 102, 0.15);
}

/* Floating Window Body */
.floating-window-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.floating-logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #0d1117;
  font-weight: 900;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  overflow: hidden;
}

.floating-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-content-col {
  flex: 1;
  min-width: 0;
}

.floating-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.floating-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.floating-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #00ff88;
  margin-top: 4px;
  font-weight: 600;
}

/* Expanded Detail Popover on Click */
.floating-detail-drawer {
  padding: 10px 14px 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  display: none;
}

.floating-detail-drawer.expanded {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.floating-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
}

.floating-metric-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 6px;
  text-align: center;
}

.floating-metric-value {
  font-weight: 800;
  color: var(--neon-cyan);
  font-size: 12px;
}

.floating-metric-label {
  font-size: 9px;
  color: #8b949e;
  text-transform: uppercase;
}

.floating-action-btn {
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #000;
  border: none;
  cursor: pointer;
  margin-top: 6px;
  text-decoration: none;
  display: block;
}

.floating-action-btn:hover {
  filter: brightness(1.15);
}

.floating-master-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.floating-master-btn {
  flex: 1;
  padding: 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.floating-master-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.floating-master-btn.move-anchor {
  color: #00f2fe;
  border-color: rgba(0, 242, 254, 0.4);
}

.floating-master-btn.move-anchor:hover {
  background: rgba(0, 242, 254, 0.2);
  color: #ffffff;
}

.floating-master-btn.delete {
  color: #ff3366;
  border-color: rgba(255, 51, 102, 0.4);
}

.floating-master-btn.delete:hover {
  background: rgba(255, 51, 102, 0.2);
}

/* 3. Interactive Click-to-Place Banner */
#floating-placement-banner {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 17, 23, 0.95);
  border: 1.5px solid #00f2fe;
  box-shadow: 0 4px 25px rgba(0, 242, 254, 0.4), 0 0 15px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: 30px;
  z-index: 2500;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  animation: slideDownPlacement 0.25s ease-out;
  pointer-events: auto;
}

@keyframes slideDownPlacement {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.floating-placement-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
  animation: pulseNeon 1s infinite alternate;
}

@keyframes pulseNeon {
  from { transform: scale(0.9); opacity: 0.7; }
  to { transform: scale(1.3); opacity: 1; }
}

.floating-placement-cancel-btn {
  background: rgba(255, 51, 102, 0.2);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.5);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.floating-placement-cancel-btn:hover {
  background: #ff3366;
  color: #ffffff;
}

/* 4. Photo Preview in Master Editor */
.floating-photo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.floating-photo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #00f2fe;
  background: #0d1117;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.5);
}

.floating-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-photo-info {
  flex: 1;
  font-size: 11px;
  color: #8b949e;
}

.floating-photo-info strong {
  color: #00ff88;
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

