/* No monospace anywhere — all .font-mono usages inherit the body font.
   Arabic monospace coverage is poor, so the existing 1k+ Tailwind .font-mono
   utilities would fall back to system fonts and break visual consistency. */
.font-mono {
  font-family: inherit;
}

html {
  scroll-padding-top: 6rem;
}

[id],
[data-bb] {
  scroll-margin-top: 6rem;
}

.bb-header-spacer {
  height: 4rem;
}

.bb-cookie-consent {
  inset-inline-end: 1rem;
  width: min(calc(100vw - 1.5rem), 28rem);
}

.bb-pattern-dots {
  background-image: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0);
  background-size: var(--bb-pattern-size, 24px) var(--bb-pattern-size, 24px);
}

.pattern-grid,
.pattern-grid-lg,
.pattern-dots {
  background-image: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0);
  background-size: var(--bb-pattern-size, 24px) var(--bb-pattern-size, 24px);
}

.pattern-grid-lg {
  --bb-pattern-size: 28px;
}

.bb-pattern-dots--bio {
  --bb-pattern-size: 26px;
}

.bypostauthor,
.gallery-caption {
  display: inherit;
}

/* Front-end forms: shared polish for the actual public pages. */
[data-bb-form-shell] {
  border-radius: 8px;
  box-shadow: 0 18px 44px rgb(var(--color-text, 31 41 55) / 0.08);
}

[data-bb-form-shell] > .flex:first-child > span,
.bb-violation-form [data-bb-form-shell] > .flex:first-child > span,
#bb-review-form > .flex:first-child > span {
  border-radius: 8px;
}

[data-bb-form] {
  --bb-form-surface: rgb(var(--color-surface, 255 255 255));
  --bb-form-surface-alt: rgb(var(--color-surface-alt, 247 247 247));
  --bb-form-text: rgb(var(--color-text, 31 41 55));
  --bb-form-muted: rgb(var(--color-text-muted, 107 114 128));
  --bb-form-border: rgb(var(--color-border, 229 231 235));
  --bb-form-primary: rgb(var(--color-primary, 30 100 50));
  --bb-form-error: rgb(var(--color-error, 220 38 38));
  color: var(--bb-form-text);
}

[data-bb-form] label,
[data-bb-form] legend {
  letter-spacing: 0;
}

[data-bb-form] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
[data-bb-form] textarea,
[data-bb-form] select {
  width: 100%;
  min-height: 3rem;
  border-radius: 6px;
  border: 1px solid var(--bb-form-border);
  background-color: var(--bb-form-surface);
  color: var(--bb-form-text);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

[data-bb-form] textarea {
  min-height: 9rem;
  line-height: 1.8;
}

[data-bb-form] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"])::placeholder,
[data-bb-form] textarea::placeholder {
  color: rgb(var(--color-text-muted, 107 114 128) / 0.64);
}

[data-bb-form] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):hover,
[data-bb-form] textarea:hover,
[data-bb-form] select:hover {
  border-color: rgb(var(--color-primary, 30 100 50) / 0.42);
}

[data-bb-form] input:focus,
[data-bb-form] textarea:focus,
[data-bb-form] select:focus,
[data-bb-form] input:focus-visible,
[data-bb-form] textarea:focus-visible,
[data-bb-form] select:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--bb-form-primary);
  box-shadow: 0 0 0 4px rgb(var(--color-primary, 30 100 50) / 0.14);
}

[data-bb-form] select {
  padding-inline-end: 2.75rem;
}

[data-bb-form] input[type="checkbox"],
[data-bb-form] input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--bb-form-primary);
  border-color: rgb(var(--color-border, 229 231 235));
}

[data-bb-form] input[type="checkbox"]:focus,
[data-bb-form] input[type="radio"]:focus {
  box-shadow: 0 0 0 4px rgb(var(--color-primary, 30 100 50) / 0.14);
}

[data-bb-form] input[type="file"] {
  border-radius: 6px;
}

[data-bb-form] input[type="file"]::file-selector-button {
  border-radius: 6px;
}

[data-bb-form] fieldset {
  min-inline-size: 0;
}

[data-bb-form] fieldset label:not(.sr-only),
[data-bb-form] .border.border-border.bg-surface,
[data-bb-form] .border.border-stone-300.bg-white,
[data-bb-form] .border-2.border-dashed {
  border-radius: 8px;
}

[data-bb-form] button[type="submit"] {
  min-height: 3rem;
  border-radius: 6px;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

[data-bb-form] button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-1px);
}

[data-bb-form] button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

[data-bb-form] button[type="submit"]:disabled {
  cursor: not-allowed;
}

[data-bb-form] [role="status"],
[data-bb-form] [role="alert"] {
  border-radius: 8px;
}

[data-bb-form="review"] [role="radiogroup"] {
  gap: 0.25rem;
}

[data-bb-form="review"] [role="radiogroup"] label {
  border-radius: 6px;
  transition: background-color 160ms ease, transform 160ms ease;
}

[data-bb-form="review"] [role="radiogroup"] label:hover {
  background-color: rgb(var(--color-warning, 217 119 6) / 0.08);
  transform: translateY(-1px);
}

[data-bb-form="newsletter"] {
  align-items: stretch;
  gap: 0.75rem !important;
}

[data-bb-form="newsletter"] input[type="email"] {
  min-width: 0;
}

[data-bb-form="newsletter"] button[type="submit"] {
  white-space: nowrap;
}

[data-bb-form="search"] {
  isolation: isolate;
}

[data-bb-form="search"] input[type="search"],
[data-bb-form="search"] select {
  min-height: 2.875rem;
}

@media (max-width: 640px) {
  [data-bb-form-shell] {
    box-shadow: 0 12px 28px rgb(var(--color-text, 31 41 55) / 0.07);
  }

  [data-bb-form="newsletter"] {
    flex-direction: column !important;
  }

  [data-bb-form="newsletter"] > div[x-show],
  [data-bb-form="newsletter"] > div[style*="display: flex"] {
    flex-direction: column !important;
  }

  [data-bb-form="newsletter"] button[type="submit"],
  [data-bb-form="search"] button[type="submit"] {
    width: 100%;
  }

  [data-bb-form] button[type="submit"]:hover:not(:disabled),
  [data-bb-form="review"] [role="radiogroup"] label:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-bb-form] *,
  [data-bb-form] *::before,
  [data-bb-form] *::after {
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 1024px) {
  html {
    scroll-padding-top: 8rem;
  }

  [id],
  [data-bb] {
    scroll-margin-top: 8rem;
  }

  .bb-header-spacer {
    height: 7.5rem;
  }

  .bb-header-spacer--scrolled {
    height: 5rem;
  }
}
