.ba-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 24, 39, .48);
}

.ba-modal-backdrop.active,
.ba-modal-backdrop[aria-hidden="false"] {
  display: flex;
}

.ba-modal-card {
  width: min(440px, 100%);
  max-height: min(680px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 20px;
}

.ba-modal-title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}

.ba-modal {
  color: #374151;
  line-height: 1.45;
}

.ba-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ba-toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 11000;
  width: min(420px, calc(100vw - 28px));
  transform: translateX(-50%);
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 16px 46px rgba(15, 23, 42, .28);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.35;
}

.ba-toast-success {
  background: #166534;
}

.ba-toast-error {
  background: #b91c1c;
}

@media (max-width: 520px) {
  .ba-modal-backdrop {
    align-items: flex-end;
    padding: 12px;
  }

  .ba-modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .ba-modal-actions {
    justify-content: stretch;
  }

  .ba-modal-actions .ba-btn {
    flex: 1 1 auto;
  }
}
