/* BBclubs Anonymous Toggle Switch Styles */

/* Toggle Switch Base Styles */
.toggle-switch {
  user-select: none;
  cursor: pointer;
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Toggle Switch Active State - Updated for correct HTML structure */
.toggle-switch input[type="checkbox"]:checked ~ .toggle-slider {
  background: #007cba !important;
}

.toggle-switch input[type="checkbox"]:checked ~ .toggle-slider .toggle-knob {
  transform: translateX(24px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Toggle Switch Disabled State */
.toggle-switch input[type="checkbox"]:disabled ~ .toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.toggle-switch input[type="checkbox"]:disabled ~ span {
  opacity: 0.6;
}

/* Toggle Switch Focus State */
.toggle-switch input[type="checkbox"]:focus ~ .toggle-slider {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* Anonymous Status Indicators */
.anon-status {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
  display: none;
}

.anon-status.active {
  display: block;
}

.anon-status.auto-anonymous {
  color: #4CAF50;
}

.anon-status.auto-anonymous::before {
  content: '✓ ';
  font-weight: bold;
}

/* Anonymous Description Text */
.anon-description {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  margin-left: 24px;
  line-height: 1.4;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .toggle-switch .toggle-slider {
    width: 40px !important;
    height: 20px !important;
  }
  
  .toggle-switch .toggle-knob {
    height: 16px !important;
    width: 16px !important;
  }
  
  .toggle-switch input[type="checkbox"]:checked ~ .toggle-slider .toggle-knob {
    transform: translateX(20px) !important;
  }
  
  .anon-description {
    margin-left: 16px;
    font-size: 11px;
  }
}

/* Animation for toggle state changes */
.toggle-slider {
  transition: background-color 0.3s ease, box-shadow 0.2s ease;
}

.toggle-knob {
  transition: transform 0.3s ease, box-shadow 0.2s ease;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .toggle-switch input[type="checkbox"]:checked ~ .toggle-slider {
    background: #000 !important;
    border: 2px solid #000;
  }
  
  .toggle-switch input[type="checkbox"]:checked ~ .toggle-slider .toggle-knob {
    background: #fff !important;
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .toggle-slider,
  .toggle-knob {
    transition: none;
  }
}
