/* === Container === */
.bf-page-tools {
  position: fixed;
  inset: 0;              /* statt right/bottom: sauberer Layer über den ganzen Viewport */
  z-index: 1090;         /* Basis-Layer */
  pointer-events: none;  /* nur Kinder klickbar */
}

/* === Floating toggle button (cog) === */
.bf-page-tools__toggle {
  pointer-events: auto;
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  padding: 0;
  font-size: 20px;
  z-index: 1070;         /* immer über Backdrop/Panel */
}

/* === Backdrop === */
.bf-page-tools__backdrop {
  pointer-events: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 1050;         /* UNTER dem Panel */
}

/* === Panel (right drawer) === */
.bf-page-tools__panel {
  pointer-events: auto;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 420px;
  max-width: calc(100vw - 24px);
  background: #fff;
  box-shadow: -12px 0 40px rgba(0,0,0,.25);
  transform: translateX(110%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
  outline: none;
  z-index: 1060;         /* ÜBER dem Backdrop */
}

/* Header */
.bf-page-tools__header {
  background: #1e2b3a; /* dunkles Blau/Grau */
  color: #fff;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bf-page-tools__title {
  font-weight: 600;
  font-size: 16px;
}

.bf-page-tools__close {
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
  padding: 0 6px;
}
.bf-page-tools__close:hover,
.bf-page-tools__close:focus {
  color: #fff;
  text-decoration: none;
}

/* Content */
.bf-page-tools__content {
  padding: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Sections */
.bf-page-tools__section + .bf-page-tools__section {
  margin-top: 18px;
}

.bf-page-tools__h {
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  margin: 0 0 10px 0;
  color: #1e2b3a;
}

/* Card wrapper around block content */
.bf-page-tools__card {
  background: #f8f9fa; /* Bootstrap light */
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 12px;
}

/* Improve default local task/action lists a bit (safe selectors) */
.bf-page-tools__card ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.bf-page-tools__card li + li {
  margin-top: 8px;
}
.bf-page-tools__card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  text-decoration: none;
}
.bf-page-tools__card a:hover {
  background: #f1f3f5;
  text-decoration: none;
}

/* === Open state === */
.bf-page-tools.is-open .bf-page-tools__panel {
  transform: translateX(0);
}
.bf-page-tools.is-open .bf-page-tools__backdrop {
  pointer-events: auto;
  opacity: 1;
}

/* Optional: hide cog when open (cleaner) */
.bf-page-tools.is-open .bf-page-tools__toggle {
  opacity: 0;
  pointer-events: none;
}

/* Mobile width */
@media (max-width: 575.98px) {
  .bf-page-tools__panel {
    width: 92vw;
  }
}

/* === Drawer Local Tasks (custom list) === */
.bf-page-tools__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bf-page-tools__item + .bf-page-tools__item {
  margin-top: 8px;
}

/* Link row */
.bf-page-tools__item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  text-decoration: none;
  color: inherit;
}

/* Chevron */
.bf-page-tools__item a:after {
  content: "›";
  opacity: .55;
  margin-left: 10px;
}

.bf-page-tools__item a:hover {
  background: #f1f3f5;
  text-decoration: none;
}

/* Active */
.bf-page-tools__item.is-active a {
  font-weight: 600;
  border-color: rgba(0,0,0,.18);
}

/* Divider between primary/secondary */
.bf-page-tools__divider {
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 14px 0;
}

/* ============ Drawer Local Actions ============ */

/* Primary action(s) as big button(s) */
.bf-page-tools__actions-primary a,
.bf-page-tools__actions-primary .btn {
  display: block;
  width: 100%;
}

.bf-page-tools__actions-primary a {
  padding: 12px 14px;
  border-radius: 10px;
  background: #1e2b3a;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,.15);
}

.bf-page-tools__actions-primary a:hover,
.bf-page-tools__actions-primary a:focus {
  background: #16202c;
  color: #fff;
  text-decoration: none;
}

/* Secondary actions list */
.bf-page-tools__actions-secondary ul,
.bf-page-tools__actions-secondary .action-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bf-page-tools__actions-secondary li + li {
  margin-top: 8px;
}

.bf-page-tools__actions-secondary a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  text-decoration: none;
  color: inherit;
}

.bf-page-tools__actions-secondary a:hover {
  background: #f1f3f5;
  text-decoration: none;
}

/* Optional: chevron */
.bf-page-tools__actions-secondary a:after {
  content: "›";
  opacity: .45;
  margin-left: 10px;
}
