@keyframes bfBraveFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Wyciszenie ewentualnego starszego recznego widgetu z Elementora, aby uniknac dublowania */
#bf-k-toast,
#bf-k-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.bf-d-toast,
.bf-d-overlay,
.bf-d-toast *,
.bf-d-overlay * {
  box-sizing: border-box;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Staly dymek w lewym dolnym rogu */
.bf-d-toast {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 325px;
  padding: 10px 34px 10px 11px;
  background: #ffffff;
  border: 1px solid rgba(53, 42, 45, 0.12);
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease, box-shadow .2s ease, bottom .2s ease, left .2s ease;
}

.bf-d-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bf-d-toast:hover {
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
}

/* Odsuniecie od ikony CookieYes w lewym dolnym rogu, jesli jest widoczna */
.bf-d-toast.bf-d-shift-cky {
  left: 76px;
}

.bf-d-avatar-wrap {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}

.bf-d-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #f3f1f2;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.bf-d-avatar img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.bf-d-toast .bf-d-avatar img {
  transform: scale(1.12);
  transform-origin: 50% 24%;
}

.bf-d-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
  display: none;
}

.bf-d-online .bf-d-dot {
  display: block;
}

.bf-d-toast-body {
  min-width: 0;
}

.bf-d-toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #352A2D;
  line-height: 1.25;
  margin: 0 0 2px 0;
}

.bf-d-toast-cta {
  font-size: 12.5px;
  font-weight: 700;
  color: #d32230;
  line-height: 1.25;
  margin: 0;
}

.bf-d-toast-brand {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #9b9396;
  line-height: 1.2;
  margin: 2px 0 0 0;
}

#bf-d-toast button.bf-d-toast-close {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 24px;
  height: 24px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: #757575;
  opacity: 0.55;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: none;
  box-shadow: none;
  transition: opacity .14s linear, transform .14s linear;
}

#bf-d-toast button.bf-d-toast-close:hover,
#bf-d-toast button.bf-d-toast-close:focus {
  opacity: 1;
  background: transparent;
  color: #352A2D;
  box-shadow: none;
  transform: scale(1.14);
}

/* Okno modalne spojne 1:1 z Brave Popup Pro (bez bluru, radius 18px, miekki cien) */
.bf-d-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: rgba(0, 0, 0, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bf-d-overlay.is-open {
  display: flex;
  animation: bfBraveFadeIn 0.4s ease forwards;
}

.bf-d-modal {
  position: relative;
  width: 100%;
  max-width: 450px;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background-color: #ffffff;
  border-radius: 18px;
  padding: 26px 24px 22px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.29);
}

/* Przycisk X jak w brave_popup__close--inside_right */
#bf-d-overlay button.bf-d-modal-close {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 30px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  padding: 3px;
  margin: 0;
  border: none;
  background: transparent;
  color: #757575;
  opacity: 0.55;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: none;
  box-shadow: none;
  transition: all .14s linear;
}

#bf-d-overlay button.bf-d-modal-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

#bf-d-overlay button.bf-d-modal-close:hover,
#bf-d-overlay button.bf-d-modal-close:focus {
  opacity: 1;
  background: transparent;
  color: #352A2D;
  box-shadow: none;
  transform: scale(1.14);
}

.bf-d-modal-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 14px;
  padding-right: 22px;
}

.bf-d-modal-avatar-wrap {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  position: relative;
}

.bf-d-modal-avatar-wrap .bf-d-dot {
  width: 14px;
  height: 14px;
  right: 2px;
  bottom: 2px;
}

.bf-d-badge {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #d32230;
  background: none;
  padding: 0;
  margin: 0 0 3px 0;
}

.bf-d-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #352A2D;
  line-height: 1.22;
  margin: 0 0 4px 0;
}

.bf-d-modal-desc {
  font-size: 13px;
  color: #6B6365;
  line-height: 1.45;
  margin: 0;
}

.bf-d-list-box {
  margin: 0 0 18px 0;
  padding: 13px 15px;
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
}

.bf-d-list-head {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: #7d7376;
  margin: 0 0 9px 0;
}

#bf-d-overlay ul.bf-d-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

#bf-d-overlay ul.bf-d-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.42;
  color: #352A2D;
  margin: 0;
  padding: 0;
}

#bf-d-overlay ul.bf-d-list li::before {
  display: none;
  content: none;
}

#bf-d-overlay ul.bf-d-list svg {
  flex: 0 0 17px;
  margin-top: 2px;
  color: #d32230;
}

.bf-d-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#bf-d-overlay a.bf-d-btn-call {
  flex: 1 1 215px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 30px;
  background: #d32230;
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: 0 6px 16px rgba(211, 34, 48, 0.24);
  transition: background .18s ease, transform .15s ease;
}

#bf-d-overlay a.bf-d-btn-call:hover,
#bf-d-overlay a.bf-d-btn-call:focus {
  background: #b51b27;
  color: #ffffff !important;
  transform: translateY(-1px);
}

#bf-d-overlay button.bf-d-btn-copy {
  flex: 0 1 auto;
  padding: 12px 16px;
  margin: 0;
  border-radius: 30px;
  border: 1px solid #d9d6d7;
  background: #ffffff;
  color: #352A2D;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

#bf-d-overlay button.bf-d-btn-copy:hover,
#bf-d-overlay button.bf-d-btn-copy:focus {
  background: #f6f7f8;
  border-color: #bcb6b8;
  color: #352A2D;
  box-shadow: none;
}

.bf-d-foot {
  margin: 11px 0 0 0;
  font-size: 12px;
  color: #8a8184;
  text-align: center;
}

/* Mobile (z uwzglednieniem Crisp w prawym rogu i CookieYes w lewym) */
@media (max-width: 600px) {
  .bf-d-toast {
    left: 12px;
    right: 72px;
    bottom: 14px;
    max-width: none;
    padding: 8px 30px 8px 10px;
    gap: 9px;
  }
  .bf-d-toast.bf-d-shift-cky {
    left: 12px;
    bottom: 70px;
  }
  .bf-d-avatar-wrap {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }
  .bf-d-toast-title { font-size: 12.5px; }
  .bf-d-toast-cta { font-size: 12px; }

  .bf-d-overlay {
    background-color: rgba(0, 0, 0, 0.43);
    padding: 12px;
  }
  .bf-d-overlay.is-open {
    animation: bfBraveFadeIn 0.3s ease forwards;
  }
  .bf-d-modal {
    max-width: 342px;
    padding: 20px 16px 16px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.27);
  }
  #bf-d-overlay button.bf-d-modal-close {
    width: 34px;
    height: 34px;
    top: 6px;
    right: 6px;
  }
  .bf-d-modal-head {
    gap: 12px;
    margin-bottom: 12px;
  }
  .bf-d-modal-avatar-wrap {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
  }
  .bf-d-badge {
    font-size: 10px;
    padding: 0;
  }
  .bf-d-modal-title { font-size: 17.5px; }
  .bf-d-modal-desc { font-size: 12.5px; }
  .bf-d-list-box {
    padding: 11px 12px;
    margin-bottom: 14px;
  }
  .bf-d-list-head { font-size: 11px; margin-bottom: 8px; }
  #bf-d-overlay ul.bf-d-list { gap: 8px; }
  #bf-d-overlay ul.bf-d-list li { font-size: 12.5px; }
  .bf-d-actions {
    flex-direction: column;
    gap: 8px;
  }
  #bf-d-overlay a.bf-d-btn-call,
  #bf-d-overlay button.bf-d-btn-copy {
    flex: 0 0 auto;
    width: 100%;
    padding: 11px 14px;
  }
}
