/**
 * Accessibility Styles
 * Fokus-Indikatoren, Utility-Klassen, Skip-Links
 */

/* ========================================
   Globale Fokus-Styles
   ======================================== */

/* Sichtbarer Fokus-Indikator fuer Tastaturnutzer */
/* Doppelter Outline (schwarz + weiss) fuer Sichtbarkeit auf allen Hintergruenden */
:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}

/* Fokus fuer Buttons und interaktive Elemente */
button:focus-visible,
.verschiebe-button:focus-visible,
.dachboden-toggle:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}

/* Fokus fuer Location-Elemente (werden per JS fokussierbar) */
.location-header:focus-visible,
.location-spalten-header:focus-visible,
.dachboden-liste-item:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}

/* Fokus fuer Links */
a:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}

/* Fokus fuer Formularelemente */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}

/* ========================================
   Visually Hidden (nur fuer Screenreader)
   ======================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Skip-Link
   ======================================== */

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip-link:focus {
  position: fixed;
  left: 10px;
  top: 10px;
  width: auto;
  height: auto;
  padding: 12px 20px;
  background: #005fcc;
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.skip-link:focus:hover {
  background: #004499;
}

/* ========================================
   Live-Region fuer Ankuendigungen
   ======================================== */

.aria-live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ========================================
   Verschiebe-Dialog (Paket 8)
   ======================================== */

.verschiebe-dialog {
  border: none;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 300px;
}

.verschiebe-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.verschiebe-dialog h2 {
  margin: 0 0 15px 0;
  font-size: 18px;
}

.verschiebe-dialog-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.verschiebe-dialog-buttons button {
  padding: 10px 15px;
  font-size: 14px;
  border: 2px solid #ccc;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.verschiebe-dialog-buttons button:hover {
  background: #f5f5f5;
  border-color: #999;
}

.verschiebe-dialog-buttons button:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}

.verschiebe-dialog-buttons button.abbrechen {
  background: #f0f0f0;
  color: #666;
}
