/* ============================================
   TOUCH GESTURE VISUAL FEEDBACK — Mobile
   ============================================ */

/* Remove 300ms tap delay on all interactive elements */
.social-icon-btn,
.hire-cta,
.profile-image-wrapper,
.typed-wrapper,
.social-section-title {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   1. SOCIAL ICONS — Touch Press Effect
   ============================================ */
.social-icon-btn {
  /* Prevent text selection on double-tap */
  -webkit-user-select: none;
  user-select: none;
}

/* Brand-specific touch flash — immediate icon color shift */
.social-icon-btn[data-brand="github"]:active i { color: #24292e; }
.social-icon-btn[data-brand="linkedin"]:active i { color: #0077B5; }
.social-icon-btn[data-brand="portfolio"]:active i { color: #DC2626; }
.social-icon-btn[data-brand="instagram"]:active i { color: #E4405F; }
.social-icon-btn[data-brand="twitter"]:active i { color: #000000; }
.social-icon-btn[data-brand="threads"]:active i { color: #000000; }
.social-icon-btn[data-brand="snapchat"]:active i { color: #FFFC00; }
.social-icon-btn[data-brand="resume"]:active i { color: #DC2626; }
.social-icon-btn[data-brand="whatsapp"]:active i { color: #25D366; }
/* Note: scale/transform handled by GSAP in touch.js */

/* ============================================
   4. TYPED WRAPPER — Touch Glow Flash
   ============================================ */
.typed-wrapper:active {
  background: var(--accent-glow);
  border-color: var(--accent);
  transition: all 50ms ease;
}

/* ============================================
   5. SOCIAL TITLE — Touch Scale
   ============================================ */
.social-section-title:active {
  transform: scale(0.97);
  transition: transform 50ms ease;
  opacity: 0.7;
}

/* ============================================
   6. RIPPLES — GSAP-injected ripple elements
   ============================================ */
.touch-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.35) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  z-index: 5;
}

.social-icon-btn .touch-ripple {
  background: radial-gradient(circle, rgba(225, 29, 72, 0.25) 0%, transparent 70%);
}

.hire-cta .touch-ripple {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
}

/* ============================================
   7. TOUCH TOOLTIP — Mobile long-press
   ============================================ */
.touch-tooltip-visible .tooltip {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
  transition: opacity 150ms ease, transform 150ms ease !important;
}

/* ============================================
   8. TOUCH TRAIL — Finger movement stars
   ============================================ */
.touch-trail-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ============================================
   9. REDUCED MOTION — Touch fallback
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .touch-ripple { display: none; }
  .touch-trail-canvas { display: none; }
  .bb-toast { transition: none !important; }
}

/* ============================================
   10. TOAST — Mobile feedback (copy-link)
   Animated confirmation with SVG checkmark
   ============================================ */
.bb-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(10px);
  background: var(--toast-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--toast-text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 20px 10px 12px;
  border-radius: 999px;
  z-index: 10000;
  opacity: 0;
  transition: opacity 200ms ease, transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--toast-border);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  border: 1px solid var(--toast-border);
}

.bb-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   SVG Checkmark — Animated confirmation icon
   Icon wrapper anchors the glow behind the SVG
   ============================================ */
.toast-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.toast-checkmark {
  width: 28px;
  height: 28px;
  display: block;
  position: relative;
  z-index: 1;
}

.toast-checkmark-circle {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: draw-circle 0.35s ease-out forwards;
}

.toast-checkmark-check {
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw-check 0.3s ease-out 0.25s forwards;
}

@keyframes draw-circle {
  0%   { stroke-dashoffset: 166; }
  100% { stroke-dashoffset: 0; }
}

@keyframes draw-check {
  0%   { stroke-dashoffset: 48; }
  100% { stroke-dashoffset: 0; }
}

/* Subtle glow pulse — perfectly centered behind checkmark */
.toast-checkmark-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  animation: glow-pulse 0.6s ease-out 0.15s forwards;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5);
}

@keyframes glow-pulse {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  50%  { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
}

.toast-text {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--toast-text);
}

/* ============================================
   REDUCED MOTION — Toast fallback
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .bb-toast { transition: none !important; }
  .toast-checkmark-circle,
  .toast-checkmark-check {
    animation: none;
    stroke-dashoffset: 0;
  }
  .toast-checkmark-glow { display: none; }
}

