/* Blisko Ludzi 3.6.0.89.1 — Skip Links Visibility Hotfix */
:root {
  --bl-a11y-focus: #0b57d0;
  --bl-a11y-focus-soft: rgba(11, 87, 208, .18);
  --bl-a11y-touch: 44px;
}

html { scroll-padding-top: 5.5rem; }
html.bl-a11y-text-large { font-size: 112.5%; }
html.bl-a11y-text-xlarge { font-size: 125%; }
html.bl-a11y-reduce-motion { scroll-behavior: auto !important; }

/* Linki pomijające są niewidoczne podczas zwykłego korzystania.
   Pojawiają się wyłącznie po otrzymaniu fokusu z klawiatury. */
.bl-skip-links {
  position: fixed;
  inset: 0 auto auto 0;
  width: 0;
  height: 0;
  overflow: visible;
  z-index: 12000;
}
.bl-skip-links a,
.bl-skip-link {
  position: fixed;
  left: .75rem;
  top: .75rem;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.bl-skip-links a:focus,
.bl-skip-links a:focus-visible,
.bl-skip-link:focus,
.bl-skip-link:focus-visible {
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  border: 3px solid var(--bl-a11y-focus);
  border-radius: .75rem;
  background: #fff;
  color: #111;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--bl-a11y-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px var(--bl-a11y-focus-soft) !important;
}
:where(button, .btn, input:not([type="hidden"]), select, textarea, .form-control, .form-select) {
  min-height: var(--bl-a11y-touch);
}
.btn-sm { min-height: 38px; }
.btn-close { min-width: var(--bl-a11y-touch); min-height: var(--bl-a11y-touch); }

[aria-invalid="true"],
.form-control.is-invalid,
.form-select.is-invalid {
  border-width: 2px;
  border-color: #b42318 !important;
  background-image: none;
}
.invalid-feedback,
.form-text { line-height: 1.45; }
.alert[role="alert"],
.alert[role="status"] { border-left-width: 5px; }

.bl-a11y-trigger {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1085;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-width: 48px;
  min-height: 48px;
  padding: .65rem .85rem;
  border: 2px solid #5d4030;
  border-radius: 999px;
  background: #fff;
  color: #2c211a;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(50, 32, 20, .2);
}
.bl-a11y-trigger:hover { background: #fff8f1; }
.bl-a11y-trigger__icon { font-size: 1.05rem; letter-spacing: -.08em; }

.bl-a11y-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 18, 22, .58);
}
.bl-a11y-backdrop.is-open { display: flex; }
.bl-a11y-dialog {
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 1.4rem;
  background: #fff;
  color: #222;
  box-shadow: 0 24px 80px rgba(0,0,0,.32);
}
.bl-a11y-dialog__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #dedede;
  background: #fff;
}
.bl-a11y-dialog__header h2 { margin: 0; font-size: 1.25rem; }
.bl-a11y-dialog__body { padding: 1.1rem; }
.bl-a11y-group { margin: 0 0 1.25rem; padding: 0; border: 0; }
.bl-a11y-group legend { margin-bottom: .65rem; font-size: 1rem; font-weight: 800; }
.bl-a11y-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.bl-a11y-option {
  min-height: 48px;
  border: 2px solid #c8c8c8;
  border-radius: .85rem;
  background: #fff;
  color: #222;
  font-weight: 700;
}
.bl-a11y-option[aria-pressed="true"] { border-color: #174ea6; background: #e8f0fe; color: #123b7a; }
.bl-a11y-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid #ececec;
}
.bl-a11y-toggle-row:last-child { border-bottom: 0; }
.bl-a11y-toggle-row strong { display: block; }
.bl-a11y-toggle-row small { display: block; color: #5e5e5e; }
.bl-a11y-switch {
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 36px;
  border: 2px solid #757575;
  border-radius: 999px;
  background: #f4f4f4;
  color: #222;
  font-size: .75rem;
  font-weight: 800;
}
.bl-a11y-switch[aria-pressed="true"] { border-color: #174ea6; background: #174ea6; color: #fff; }
.bl-a11y-reset { width: 100%; }
.bl-a11y-live {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
body.bl-a11y-dialog-open { overflow: hidden; }

html.bl-a11y-underline-links body a:not(.btn):not(.navbar-brand):not(.brand) {
  text-decoration: underline !important;
  text-decoration-thickness: .12em !important;
  text-underline-offset: .18em !important;
}

html.bl-a11y-high-contrast body {
  --bl-bg: #fff;
  --bl-card: #fff;
  --bl-text: #111;
  --bl-muted: #333;
  --bl-primary: #003f8f;
  --bl-primary-dark: #002d68;
  --bl-soft: #eef4ff;
  --bl-border: #444;
  background: #fff !important;
  color: #111 !important;
}
html.bl-a11y-high-contrast body :where(.text-muted, small, .form-text) { color: #333 !important; }
html.bl-a11y-high-contrast body :where(.card, .modal-content, .dropdown-menu, .public-navbar, .admin-topbar, .admin-sidebar, .bl-event-detail__card, .bl-event-detail__side-card) {
  border-color: #444 !important;
  box-shadow: none !important;
}
html.bl-a11y-high-contrast body .btn-primary { background: #003f8f !important; border-color: #003f8f !important; color: #fff !important; }
html.bl-a11y-high-contrast body .btn-outline-primary { color: #003f8f !important; border-color: #003f8f !important; }
html.bl-a11y-high-contrast body .btn-outline-primary:hover { background: #003f8f !important; color: #fff !important; }
html.bl-a11y-high-contrast body :where(.badge.bg-warning, .text-bg-warning) { color: #111 !important; }

html.bl-a11y-reduce-motion *,
html.bl-a11y-reduce-motion *::before,
html.bl-a11y-reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

.table-responsive[tabindex="0"] { position: relative; }
.table-responsive[tabindex="0"]:focus-visible { border-radius: .75rem; }
.table th { white-space: nowrap; }

.leaflet-container:focus-visible,
[event-map-region]:focus-visible { outline: 4px solid var(--bl-a11y-focus) !important; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 991.98px) {
  .bl-a11y-trigger { bottom: calc(var(--bl-bottom-nav-h, 0px) + 1rem + env(safe-area-inset-bottom, 0px)); }
  body:not(.blisko-user-mobile) .bl-a11y-trigger { bottom: max(1rem, env(safe-area-inset-bottom)); }
  .admin-topbar { align-items: flex-start !important; flex-wrap: wrap; padding-left: 1rem !important; padding-right: 1rem !important; }
  .content-wrap { padding: 1rem !important; }
  .admin-sidebar { max-height: 46vh; overflow-y: auto; border-bottom: 1px solid rgba(0,0,0,.15); }
  .bl-event-detail__hero-actions > *,
  .bl-event-detail__hero-actions form,
  .bl-event-detail__hero-actions .btn { width: 100%; }
  .modal-dialog { margin: .75rem; }
  .modal-content { max-height: calc(100vh - 1.5rem); max-height: calc(100dvh - 1.5rem); }
  .modal-body { overflow-y: auto; }
}

@media (max-width: 575.98px) {
  html.bl-a11y-text-xlarge { font-size: 118.75%; }
  .bl-a11y-options { grid-template-columns: 1fr; }
  .bl-a11y-backdrop { padding: 0; align-items: stretch; }
  .bl-a11y-dialog { width: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
  .bl-a11y-trigger { left: .65rem; min-width: 46px; min-height: 46px; padding: .55rem .7rem; }
  .bl-a11y-trigger__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .btn:not(.btn-link), .form-control, .form-select { min-height: 46px; }
  .input-group > .btn { min-height: 46px; }
  .table-responsive { margin-inline: -.35rem; padding-inline: .35rem; }
}
