/* ═══════════════════════════════════════════════════════════════════════════
   NTCK · V6 SHARED — UX elements dùng chung cho mọi sub-page
   Yêu cầu: gsap-init.js đã load (chia sẻ matchMedia + GSAP)
   ─────────────────────────────────────────────────────────────────────────
   5 elements: scroll progress, cursor spotlight, AI chat trigger,
               magnetic buttons, floating mini CTA bar
   Style: light theme đồng bộ V6 (green #10b981 + gold #fbbf24)
   ═════════════════════════════════════════════════════════════════════════ */

/* ── 1. SCROLL PROGRESS BAR ────────────────────────────────────────────── */
.v6s-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #34d399, #fbbf24);
  z-index: 1000;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── 2. CURSOR SPOTLIGHT (desktop only) ────────────────────────────────── */
.v6s-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.35);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s;
  display: none;
}
.v6s-cursor.is-hover {
  width: 48px; height: 48px;
  background: rgba(251, 191, 36, 0.25);
}
.v6s-cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  display: none;
}
@media (min-width: 1280px) {
  .v6s-cursor, .v6s-cursor-glow { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .v6s-cursor, .v6s-cursor-glow { display: none !important; }
}

/* ── 3. AI CHAT TRIGGER (góc phải dưới) ────────────────────────────────── */
.v6s-ai-chat {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2962FF, #0068FF);
  color: white;
  border: none;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 104, 255, 0.45);
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.v6s-ai-chat:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 38px rgba(0, 104, 255, 0.6);
}
.v6s-ai-chat::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #4D8EFF;
  animation: v6s-pulse 2s infinite;
}
@keyframes v6s-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.v6s-ai-chat .v6s-ai-badge {
  letter-spacing: 0.2px;
  position: absolute;
  top: -6px; right: -6px;
  background: #fbbf24;
  color: #111827;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  border: 2px solid white;
  font-family: 'Inter', sans-serif;
}
.v6s-ai-chat .v6s-ai-tooltip {
  position: absolute;
  bottom: 50%;
  right: calc(100% + 14px);
  transform: translateY(50%) translateX(8px);
  background: #111827;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.v6s-ai-chat .v6s-ai-tooltip::after {
  content: '';
  position: absolute;
  left: 100%; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #111827;
}
.v6s-ai-chat:hover .v6s-ai-tooltip {
  opacity: 1;
  transform: translateY(50%) translateX(0);
}
@media (max-width: 640px) {
  .v6s-ai-chat { width: 52px; height: 52px; bottom: 16px; right: 16px; font-size: 22px; }
  .v6s-ai-chat .v6s-ai-tooltip { display: none; }
}

/* ── 4. FLOATING MINI CTA BAR ───────────────────────────────────────────── */
.v6s-floating-cta {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 94;
  background: rgba(10, 31, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  padding: 8px 10px 8px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.v6s-floating-cta.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.v6s-floating-cta-text {
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.v6s-floating-cta-text .price {
  color: #fbbf24;
  font-weight: 800;
}
.v6s-floating-cta a {
  background: linear-gradient(135deg, #10b981, #047857);
  color: white;
  padding: 8px 18px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: transform 0.2s;
}
.v6s-floating-cta a:hover { transform: scale(1.05); }
@media (max-width: 1279px) {
  /* ẩn floating CTA trên mobile + tablet portrait — tránh chồng chéo content */
  .v6s-floating-cta,
  .v6s-floating-cta.visible {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(200px) !important;
  }
}

/* ── 5. MAGNETIC BUTTONS (chỉ kèm class data-v6s-magnetic) ─────────────── */
/* Logic JS — không cần CSS riêng, chỉ ensure transition smooth */
[data-v6s-magnetic] {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

/* ── EXTRA — body padding để chừa cho AI chat trên mobile ───────────── */
body { scroll-behavior: smooth; }
