/* Accessibility Widget Styles */

/* Accessibility Toggle Button */
.accessibility-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.accessibility-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.accessibility-toggle svg {
  width: 28px;
  height: 28px;
  fill: white;
}

/* Accessibility Panel */
.accessibility-panel {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

.dark-theme .accessibility-panel {
  background: #1a1a2e;
  border: 1px solid #333;
}

.accessibility-panel.active {
  display: flex;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Panel Header */
.accessibility-panel-header {
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accessibility-panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.accessibility-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.accessibility-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Panel Content */
.accessibility-panel-content {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

/* Control Item */
.accessibility-control {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.dark-theme .accessibility-control {
  border-bottom-color: #333;
}

.accessibility-control:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.accessibility-control-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.dark-theme .accessibility-control-label {
  color: #e0e0e0;
}

/* Button Group */
.accessibility-button-group {
  display: flex;
  gap: 8px;
}

.accessibility-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dark-theme .accessibility-btn {
  background: #2a2a3e;
  border-color: #444;
  color: #e0e0e0;
}

.accessibility-btn:hover {
  background: #e9ecef;
  border-color: #667eea;
}

.dark-theme .accessibility-btn:hover {
  background: #3a3a4e;
  border-color: #667eea;
}

.accessibility-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Toggle Switch */
.accessibility-toggle-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.dark-theme .accessibility-toggle-switch {
  background: #2a2a3e;
}

.accessibility-toggle-switch:hover {
  background: #e9ecef;
}

.dark-theme .accessibility-toggle-switch:hover {
  background: #3a3a4e;
}

.accessibility-switch {
  position: relative;
  width: 48px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  transition: background 0.3s;
}

.accessibility-switch.active {
  background: #667eea;
}

.accessibility-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
}

.accessibility-switch.active::after {
  transform: translateX(24px);
}

/* Reset Button */
.accessibility-reset {
  width: 100%;
  padding: 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
  transition: background 0.2s;
}

.accessibility-reset:hover {
  background: #c82333;
}

/* High Contrast Mode */
body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast a {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

body.high-contrast button,
body.high-contrast .btn {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #fff !important;
}

/* Underline Links */
body.underline-links a {
  text-decoration: underline !important;
}

/* Readable Font */
body.readable-font,
body.readable-font * {
  font-family: 'Arial', 'Helvetica', sans-serif !important;
}

/* Text Size Variations */
body.text-size-small {
  font-size: 14px;
}

body.text-size-normal {
  font-size: 16px;
}

body.text-size-large {
  font-size: 18px;
}

body.text-size-xlarge {
  font-size: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .accessibility-panel {
    width: calc(100% - 40px);
    right: 20px;
    left: 20px;
    bottom: 80px;
  }
  
  .accessibility-toggle {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
  }
}

/* Skip to Content Link (for keyboard navigation) */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #667eea;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 10000;
}

.skip-to-content:focus {
  top: 0;
}
