
/* Custom Range Slider Styles */
input[type="range"].slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"].slider::-webkit-slider-track {
  background: currentColor;
  height: 0.5rem;
  border-radius: 0.5rem;
}

input[type="range"].slider::-moz-range-track {
  background: currentColor;
  height: 0.5rem;
  border-radius: 0.5rem;
}

input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: white;
  border: 3px solid currentColor;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
}

input[type="range"].slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

input[type="range"].slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

input[type="range"].slider::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: white;
  border: 3px solid currentColor;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
}

input[type="range"].slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

input[type="range"].slider::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

/* Dual Range Slider - Only thumbs are interactive */
input[type="range"].slider-thumb-pointer {
  pointer-events: none;
}

input[type="range"].slider-thumb-pointer::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: white;
  border: 2px solid #9C4FDD;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
}

input[type="range"].slider-thumb-pointer::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(156, 79, 221, 0.4);
}

input[type="range"].slider-thumb-pointer::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
  border-color: #5A179B;
}

input[type="range"].slider-thumb-pointer::-moz-range-thumb {
  pointer-events: auto;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: white;
  border: 2px solid #9C4FDD;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
}

input[type="range"].slider-thumb-pointer::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(156, 79, 221, 0.4);
}

input[type="range"].slider-thumb-pointer::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
  border-color: #5A179B;
}

/* Pull to Refresh Indicator */
.pull-to-refresh-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  pointer-events: none;
  will-change: transform, opacity;
}

.pull-to-refresh-indicator.ready {
  color: #10b981; /* green-500 */
}

.pull-to-refresh-indicator.refreshing {
  color: #3b82f6; /* blue-500 */
}

/* Spinner animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.pull-to-refresh-spinner {
  animation: spin 1s linear infinite;
}

/* Recording button pulse animation */
@keyframes recording-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
  }
}

.recording-pulse {
  animation: recording-pulse 1.5s ease-in-out infinite;
}

/* Privacy Mode Styles */
/* When body has .privacy-mode class, blur/redact sensitive content */

/* Blur images (thumbnails, avatars) */
body.privacy-mode [data-privacy="blur"] {
  filter: blur(20px);
  transition: filter 0.15s ease-out;
}

/* Blur images inside containers marked for privacy */
body.privacy-mode [data-privacy="blur-content"] img {
  filter: blur(20px);
  transition: filter 0.15s ease-out;
}

/* Redact text (titles, usernames, tags) */
body.privacy-mode [data-privacy="redact"] {
  color: transparent !important;
  background-color: currentColor;
  border-radius: 0.25rem;
  user-select: none;
  transition: color 0.15s ease-out, background-color 0.15s ease-out;
}

/* Hide sensitive elements completely */
body.privacy-mode [data-privacy="hide"] {
  visibility: hidden;
}

/* Blur with overlay for thumbnails (prevents seeing through blur) */
body.privacy-mode [data-privacy="blur-thumbnail"] {
  position: relative;
}

body.privacy-mode [data-privacy="blur-thumbnail"]::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(24px);
  background: rgba(0, 0, 0, 0.3);
  border-radius: inherit;
}

body.privacy-mode [data-privacy="blur-thumbnail"] img {
  filter: blur(20px);
}

/* Privacy mode indicator pulse - subtle animation on toggle button when active */
@keyframes privacy-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(156, 79, 221, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(156, 79, 221, 0);
  }
}

body.privacy-mode [data-privacy-toggle] {
  animation: privacy-pulse 2s ease-in-out infinite;
}

/* Cap.js Captcha Widget Dark Mode */
@media (prefers-color-scheme: dark) {
  cap-widget {
    --cap-background: #1f2937;
    --cap-border-color: #374151;
    --cap-color: #f3f4f6;
    --cap-checkbox-border: 1px solid #4b5563;
    --cap-checkbox-background: #111827;
    --cap-spinner-color: #f3f4f6;
    --cap-spinner-background-color: #374151;
  }
}
