/* RT-Angebotsgenerator – anwendungsspezifische Barrierefreiheits-Ergaenzungen.
   Die RTUI-Masterdatei bleibt unveraendert. */
.rt-skip-link {
  position: fixed;
  inset-block-start: .5rem;
  inset-inline-start: .5rem;
  z-index: 1085;
  transform: translateY(-160%);
  padding: .625rem .875rem;
  border-radius: var(--bs-border-radius);
  background: var(--bs-primary);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--bs-box-shadow);
}
.rt-skip-link:focus,
.rt-skip-link:focus-visible {
  transform: translateY(0);
  color: #fff;
  outline: .2rem solid rgba(var(--bs-primary-rgb), .35);
  outline-offset: .15rem;
}

#main-content:focus {
  outline: none;
}

.rt-table-scroll-region {
  scrollbar-gutter: stable;
}
.rt-table-scroll-region:focus-visible {
  outline: .2rem solid rgba(var(--bs-primary-rgb), .35);
  outline-offset: .15rem;
  border-radius: var(--bs-border-radius);
}

[data-rt-validation-summary] a {
  font-weight: 600;
}

.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"],
.form-check-input[aria-invalid="true"] {
  border-color: var(--bs-danger);
}

@media (max-width: 767.98px) {
  .rt-responsive-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .rt-responsive-actions > .btn,
  .rt-responsive-actions > form,
  .rt-responsive-actions > form > .btn {
    width: 100%;
  }
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rt-skip-link,
  .modal.fade .modal-dialog,
  .offcanvas,
  .collapsing {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .rt-skip-link,
  .badge,
  .btn {
    forced-color-adjust: auto;
  }
}

/* Backendnavigation: eigener Scrollbereich, gruppierte Untermenues und keine Umbrueche.
   Bootstrap .nav setzt flex-wrap: wrap. Bei einer flex-column-Navigation und begrenzter
   Hoehe wuerde dadurch eine zweite Spalte entstehen. Deshalb hier explizit nowrap. */
.rt-sidebar-nav {
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap !important;
  align-content: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  padding-inline-end: .25rem;
}

.rt-sidebar-nav > .nav-link,
.rt-sidebar-nav > .rt-nav-group {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.rt-sidebar-nav .nav-link {
  min-width: 0;
  max-width: 100%;
}

.rt-nav-icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-inline-end: .625rem;
  color: currentColor;
}

.rt-nav-submenu .rt-nav-icon {
  width: 1rem;
  height: 1rem;
  margin-inline-end: .55rem;
}

.rt-nav-link.active .rt-nav-icon,
.rt-nav-link:hover .rt-nav-icon,
.rt-nav-group-toggle:hover .rt-nav-icon,
.rt-nav-group-toggle[aria-expanded="true"] .rt-nav-icon {
  opacity: 1;
}

.rt-nav-link:not(.active) .rt-nav-icon,
.rt-nav-group-toggle .rt-nav-icon {
  opacity: .9;
}

.rt-nav-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-nav-group-toggle {
  border: 0;
  background: transparent;
}

.rt-nav-chevron {
  transition: transform .2s ease;
}

.rt-nav-group-toggle[aria-expanded="true"] .rt-nav-chevron {
  transform: rotate(90deg);
}

.rt-nav-submenu {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap !important;
  margin-block: .25rem .5rem;
  padding: .35rem .35rem .4rem .75rem;
  border-radius: .5rem;
  background: rgba(255, 255, 255, .055);
}

.rt-nav-submenu .nav-link {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  font-size: .9375rem;
}

@media (prefers-reduced-motion: reduce) {
  .rt-nav-chevron {
    transition: none !important;
  }
}

/* RTUI: Die Layoutbreiten werden durch die Bootstrap-/RTUI-Gridstruktur bestimmt.
   Keine z-index-Sonderbehandlung fuer die Desktop-Navigation erforderlich. */

.rt-textblock-preview { max-width: 28rem; }

/* v0.23.0-alpha.1: geführte öffentliche Angebotsanfrage */
@media (min-width: 992px) {
  .rt-public-side-sticky {
    position: sticky;
    top: 6rem;
  }
}
.rt-wizard-progress-bar {
  transition: width .2s ease;
}
.rt-progress-0 { width: 0%; }
.rt-progress-5 { width: 5%; }
.rt-progress-10 { width: 10%; }
.rt-progress-15 { width: 15%; }
.rt-progress-20 { width: 20%; }
.rt-progress-25 { width: 25%; }
.rt-progress-30 { width: 30%; }
.rt-progress-35 { width: 35%; }
.rt-progress-40 { width: 40%; }
.rt-progress-45 { width: 45%; }
.rt-progress-50 { width: 50%; }
.rt-progress-55 { width: 55%; }
.rt-progress-60 { width: 60%; }
.rt-progress-65 { width: 65%; }
.rt-progress-70 { width: 70%; }
.rt-progress-75 { width: 75%; }
.rt-progress-80 { width: 80%; }
.rt-progress-85 { width: 85%; }
.rt-progress-90 { width: 90%; }
.rt-progress-95 { width: 95%; }
.rt-progress-100 { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .rt-wizard-progress-bar { transition: none; }
}

/* v0.23.0-alpha.22: HTML-Signatur-Editor */
.rt-signature-editor-toolbar {
  position: sticky;
  top: 4.25rem;
  z-index: 10;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-bottom: 0;
  border-radius: .5rem .5rem 0 0;
  padding: .75rem;
}
.rt-signature-editor-toolbar .form-select,
.rt-signature-editor-toolbar .form-control-color {
  width: auto;
  min-width: 7.5rem;
}
.rt-signature-editor-toolbar .form-control-color {
  min-width: 3rem;
  width: 3rem;
}
.rt-signature-editor-surface {
  min-height: 34rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0 0 .5rem .5rem;
  background: #fff;
}
.rt-signature-editor-source {
  min-height: 34rem;
  border-radius: 0 0 .5rem .5rem;
  resize: vertical;
  tab-size: 2;
}
.rt-signature-editor-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
  padding-inline-end: .5rem;
  margin-inline-end: .25rem;
  border-inline-end: 1px solid var(--bs-border-color);
}
.rt-signature-editor-group:last-child {
  border-inline-end: 0;
  margin-inline-end: 0;
  padding-inline-end: 0;
}
@media (max-width: 767.98px) {
  .rt-signature-editor-toolbar { position: static; }
  .rt-signature-editor-group { border-inline-end: 0; padding-inline-end: 0; }
  .rt-signature-editor-surface,
  .rt-signature-editor-source { min-height: 28rem; }
}

/* Dark mode: Outline-Buttons bleiben bewusst transparent und verwenden eine einheitliche helle Kontur. */
[data-bs-theme="dark"] .btn[class*="btn-outline-"] {
  --bs-btn-color: #ededed;
  --bs-btn-border-color: #ededed;
  --bs-btn-hover-color: #ededed;
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: #ededed;
  --bs-btn-active-color: #ededed;
  --bs-btn-active-bg: transparent;
  --bs-btn-active-border-color: #ededed;
  --bs-btn-disabled-color: #ededed;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #ededed;
  color: #ededed;
  border-color: #ededed;
  background-color: transparent;
}
[data-bs-theme="dark"] .btn[class*="btn-outline-"]:hover,
[data-bs-theme="dark"] .btn[class*="btn-outline-"]:focus-visible,
[data-bs-theme="dark"] .btn[class*="btn-outline-"]:active,
[data-bs-theme="dark"] .btn[class*="btn-outline-"].active {
  color: #ededed;
  border-color: #ededed;
  background-color: transparent;
}
