/* accessibility.css */

/* General Accessibility Improvements */
body {
  forced-colors: auto;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid Highlight;
  outline-offset: 2px;
}

/* Accessibility Widget Container - Fixed to viewport */
#accessibility-icon-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10000;
}

/* Accessibility Icon */
#accessibility-icon {
  background-color: #2980b9;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10001;
}

#accessibility-icon:hover {
  background-color: #3498db;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#accessibility-icon:focus {
  outline: 3px solid #ff9900;
  outline-offset: 3px;
  transform: scale(1.05);
}

/* Accessibility Panel */
#accessibility-panel {
  background-color: #21209c;
  color: white;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 25px;
  width: 300px;
  position: absolute;
  bottom: 70px;
  right: 0;
  display: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  max-height: 80vh;
  overflow-y: auto;
}

#accessibility-panel.open {
  display: block;
  animation: slideIn 0.3s ease;
}

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

#accessibility-panel h2 {
  color: white;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 22px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

#accessibility-panel p {
  color: #e0e0e0;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 15px;
}

/* Tool Styles */
.accessibility-tool {
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.accessibility-tool:last-child {
  margin-bottom: 20px;
}

.accessibility-tool label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.accessibility-tool label::before {
  content: '⚙️';
  margin-right: 10px;
  font-size: 18px;
}

.accessibility-tool input[type="range"] {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(to right, #ddd, #2980b9);
  outline: none;
  -webkit-appearance: none;
  margin: 15px 0;
}

.accessibility-tool input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: 3px solid #2980b9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.accessibility-tool input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.accessibility-tool input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: 3px solid #2980b9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#font-size-description,
#contrast-description {
  font-size: 14px;
  color: #b0b0b0;
  margin-top: 8px;
  font-style: italic;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 5px;
  border-left: 3px solid #2980b9;
}

/* Close button */
#accessibility-panel .close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: white;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  transition: all 0.2s ease;
}

#accessibility-panel .close-button:hover,
#accessibility-panel .close-button:focus {
  background-color: rgba(255, 255, 255, 0.3);
  color: #ff9900;
  outline: 2px solid #ff9900;
  transform: rotate(90deg);
}

/* Link in panel */
#accessibility-panel a {
  display: block;
  background-color: #2980b9;
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 6px;
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

#accessibility-panel a:hover,
#accessibility-panel a:focus {
  background-color: #3498db;
  text-decoration: none;
  outline: none;
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  #accessibility-icon-container {
    bottom: 20px;
    right: 20px;
  }
  
  #accessibility-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  #accessibility-panel {
    width: 280px;
    right: -10px;
    bottom: 60px;
  }
}

@media (max-width: 480px) {
  #accessibility-panel {
    width: 90vw;
    right: 5vw;
    bottom: 60px;
  }
}