/* Modal & Button Styles for Accessibility */
#accessibility-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  padding: 12px 20px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  font-size: 14px;
  transition: background-color 0.2s;
}
#accessibility-button:hover {
  background-color: #333 !important;
}
#accessibility-modal {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 1001;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border-radius: 8px;
  display: none;
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 120px);
  border: 1px solid #eee;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Responsive adjustments for the modal */
@media (max-width: 768px) {
  #accessibility-modal {
    width: calc(100vw - 40px);
    left: 20px;
    right: 20px;
    bottom: 80px;
    padding: 15px;
  }
}

@media (max-height: 600px) {
  #accessibility-modal {
    bottom: 10px;
    max-height: calc(100vh - 20px);
    top: auto;
  }
}

/* When font sizes get very large, make modal more compact */
@media (min-width: 769px) {
  #accessibility-modal {
    width: min(400px, calc(100vw - 40px));
  }
}
#accessibility-modal button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  padding: 8px 15px;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: opacity 0.2s;
  white-space: normal;
  hyphens: auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#accessibility-modal button:hover {
  opacity: 0.9;
}

/* Responsive button layout */
@media (max-width: 400px) {
  #accessibility-modal button {
    font-size: 14px;
    padding: 6px 12px;
    margin-right: 4px;
    margin-bottom: 6px;
  }
}

/* Make button text wrap on very small screens */
@media (max-width: 320px) {
  #accessibility-modal button {
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
}
#accessibility-modal h2 {
  margin-top: 0;
  color: #000;
  font-size: 22px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}
#accessibility-modal ul {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}
#accessibility-modal li {
  margin-bottom: 20px;
}
#accessibility-modal details {
  margin-top: 25px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}
#accessibility-modal summary {
  font-weight: bold;
  cursor: pointer;
  color: #000;
  font-size: 16px;
}
#accessibility-modal .alt-text-container {
  margin: 15px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}
#accessibility-modal .image-alt-text {
  font-size: 18px;
  line-height: 1.5;
  color: #000;
  font-weight: 500;
}

@media (max-width:600px) {
  #accessibility-moda, #accessibility-button {
  display:none;
  }
  
}
