:root {
  --buzzing-accent: #f4c430;
}

.navbar-brand {
  letter-spacing: 0.5px;
}

.card {
  border-color: rgba(0, 0, 0, 0.075);
}

.badge.text-bg-ok {
  background-color: #1e7e34;
  color: #fff;
}
.badge.text-bg-fail {
  background-color: #dc3545;
  color: #fff;
}
.badge.text-bg-warn {
  background-color: #ffc107;
  color: #000;
}
.badge.text-bg-unknown {
  background-color: #6c757d;
  color: #fff;
}
.badge.text-bg-info {
  background-color: #0dcaf0;
  color: #000;
}

.thread-row-selected {
  background-color: rgba(13, 110, 253, 0.08);
}
.thread-row:focus {
  outline: 2px solid rgba(13, 110, 253, 0.35);
  outline-offset: -2px;
}
.thread-row label.thread-select {
  cursor: pointer;
}

img.buzzing-blocked-img {
  cursor: pointer;
  border: 1px dashed #999;
  min-width: 120px;
  min-height: 80px;
}
img.buzzing-blocked-img:hover {
  border-color: #0d6efd;
}
img.buzzing-loaded-img {
  border: none;
}

/* Mobile / narrow viewport tweaks. Desktop layouts stay unchanged. */
@media (max-width: 767.98px) {
  /* The navbar search has a min-width of 240px inline — let it shrink
     below that on narrow screens so the search box doesn't blow out
     the collapsed navbar width. */
  nav.navbar input[name="q"] {
    min-width: 0 !important;
  }

  /* Inbox thread rows: stack the click-through link and its action
     buttons vertically so neither gets truncated. The action row sits
     under the row's text and spreads across full width for easy tap. */
  .thread-row > .d-flex {
    flex-direction: column;
    align-items: stretch !important;
  }
  .thread-row-actions {
    justify-content: flex-end;
    padding: 0.25rem 0.75rem 0.5rem;
    gap: 0.5rem !important;
  }
  .thread-row-actions .btn,
  .thread-row-actions button {
    min-height: 38px;
    min-width: 38px;
  }

  /* Page-level action button rows: slightly taller for touch. */
  .d-flex.flex-wrap.gap-2 > .btn,
  .d-flex.flex-wrap.gap-2 > form > .btn {
    min-height: 38px;
  }

  /* Narrow-screen padding on .mx-auto content wrappers so text doesn't
     kiss the viewport edge. */
  main.container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Email HTML iframes can have their own wide content; allow
     horizontal scroll within the iframe wrapper, not the whole page. */
  iframe.buzzing-email-iframe {
    max-width: 100%;
  }
}
