/* path: wp-content/themes/bedrebyttede/assets/css/base.css */

[hidden] {
  display: none !important
}

/* Focus ring aligned to new tokens */
:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--brand), transparent 75%);
  outline-offset: 2px;
  border-radius: 8px;
  /* matches our focus aesthetic */
}

/* Respect reduced motion using new tokens (no change in logic) */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Utility for assistive-only content (unchanged semantics) */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------ SSR styles ------ */
.bb-opret-ssr-wrapper {
  width: min(var(--container-xl), 96vw);
  padding-inline: clamp(12px, 2vw, var(--space-4));
  margin-inline: auto;
  margin-top: var(--space-12);
}

/* ------ Notification Banner ------ */
.bb-noti-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  min-height: 36px;
  z-index: 59;
  /* Behind header (header usually >1000 or elev-1) */
  background: var(--surface-1, #fff);
  color: var(--text-1, #111);
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-2, 0 4px 6px -1px rgb(0 0 0 / 0.1));

  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  /* click-through when hidden */
}

.bb-noti-banner.is-visible {
  transform: translateY(var(--header-h, 50px));
  pointer-events: auto;
}

.bb-noti-banner__content {
  flex: 1;
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
}

.bb-noti-banner__timer {
  opacity: 0.6;
  margin-left: 0.5ch;
  font-variant-numeric: tabular-nums;
}

.bb-noti-banner__close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  padding: 0.25rem;
  margin-left: 1rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}

.bb-noti-banner__close:hover {
  opacity: 1;
}

/* Modifiers */
.bb-noti-banner--success {
  border-bottom-color: var(--accent);
  color: var(--brand-700);
  background: var(--surface, #fff);
}

.bb-noti-banner--warning {
  border-bottom-color: var(--warn);
  background: var(--surface, #fff);
}

.bb-noti-banner--danger {
  border-bottom-color: var(--danger);
  color: var(--danger);
  background: var(--surface, #fff);
}

/* Deleted Listing State */
.deleted-listing {
  opacity: 0.2 !important;
  pointer-events: none !important;
  filter: grayscale(1);
  transition: opacity 0.3s ease;
}

@media (min-width: 48rem) {

  /* Ensure header z-index is higher if needed, assuming header uses .elev-1 */
  .bb-header {
    z-index: 1000;
  }
}