/* Accessibility Keybind Modal
   Eigenständig, themefähig, keine Abhängigkeit vom bestehenden Modalmodul.
*/

.a11y-trigger {
  min-width: var(--header-control-h, 38px);
  width: var(--header-control-h, 38px);
  height: var(--header-control-h, 38px);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.a11y-trigger:hover,
.a11y-trigger[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-2);
}

.a11y-trigger:active {
  transform: translateY(1px);
}

.a11y-trigger:focus-visible {
  outline: none;
  border-color: var(--border);
  box-shadow: var(--focus-ring-soft);
}

.a11y-trigger-icon {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.a11y-layer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: none !important;
  pointer-events: none !important;
}

.a11y-layer.a11y-is-open {
  display: block !important;
  pointer-events: auto !important;
}

.a11y-layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / .58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.a11y-modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 34px);
  color: var(--text);
}

.a11y-modal-card {
  position: relative;
  isolation: isolate;
  width: min(620px, 100%);
  max-height: min(78vh, 720px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.a11y-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.a11y-modal-head h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.a11y-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.a11y-modal-body {
  position: relative;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 18px 22px 96px;
}

.a11y-modal-intro {
  margin: 0 0 16px;
  color: var(--text-2);
  line-height: 1.55;
}

.a11y-keybind-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.a11y-keybind-row {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.a11y-key {
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--border-2);
  border-bottom-width: 3px;
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
}

.a11y-keybind-text {
  display: grid;
  gap: 3px;
}

.a11y-keybind-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.a11y-keybind-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

html.a11y-modal-open,
body.a11y-modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}

@media (max-width: 820px) {
  .a11y-trigger {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 640px) {
  .a11y-modal {
    align-items: end;
    padding: 12px;
  }

  .a11y-modal-card {
    width: 100%;
    max-height: 86vh;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
  }

  .a11y-modal-head {
    padding: 18px 18px 14px;
  }

  .a11y-modal-body {
    padding: 16px 18px 96px;
  }

  .a11y-keybind-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
.a11y-key {
    justify-self: start;
  }
}


.a11y-trigger-icon use {
  fill: none;
  stroke: currentColor;
}


/* Modal-internal scroll-to-top:
   Position only. Visual styling is inherited from the existing body scroll-to-top classes.
*/







@media (max-width: 640px) {

}







@media (max-width: 640px) {

}


.a11y-modal-scrolltop {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: auto;
  z-index: 10;
  width: 46px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--scroll-top-bg, #2f6fb8);
  color: var(--btn-primary-text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.a11y-modal-scrolltop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.a11y-modal-scrolltop.left {
  left: 18px;
  right: auto;
}

.a11y-modal-scrolltop:hover {
  background: color-mix(in srgb, var(--scroll-top-bg, #2f6fb8) 88%, #000 12%);
  color: var(--btn-primary-border);
  transform: translateY(-2px);
}

.a11y-modal-scrolltop.show:hover {
  transform: translateY(-2px);
}

.a11y-modal-scrolltop:active {
  transform: translateY(0);
}

.a11y-modal-scrolltop:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-soft), var(--shadow-soft);
}

.a11y-modal-scrolltop .ui-icon,
.a11y-modal-scrolltop .icon,
.a11y-modal-scrolltop svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .a11y-modal-scrolltop {
    right: 16px;
    bottom: 16px;
  }

  .a11y-modal-scrolltop.left {
    left: 16px;
    right: auto;
  }
}


@media (max-width: 820px) {
  .a11y-modal-body {
    padding-bottom: 96px;
  }
}

@media (max-width: 640px) {
  .a11y-modal-body {
    padding-bottom: 96px;
  }
}

/* Skip-Link for keyboard users */
.skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 9999;
	max-width: calc(100vw - 24px);
	padding: 10px 14px;
	border: 1px solid var(--border-2);
	border-radius: var(--radius-md);
	background: var(--surface);
	color: var(--text);
	font-weight: 800;
	text-decoration: none;
	box-shadow: var(--shadow-lg);
	transform: translateY(-160%);
	opacity: 0;
	pointer-events: none;
	transition: transform .16s ease, opacity .16s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
	outline: none;
	box-shadow: var(--focus-ring-soft), var(--shadow-soft);
}

#mainContent:focus {
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	.skip-link {
		transition: none;
	}
}


/* Unified focus cleanup for browser defaults */
button:focus,
a:focus {
	outline: none;
}

button:focus-visible,
a:focus-visible {
	outline: none;
}

.a11y-modal-body:focus-visible {
	outline: none;
	box-shadow: inset 4px 0 0 var(--focus);
}
