/* Hall of Taps – BeerGraphs-style layout */
:root {
  --bg: #fff;
  --text: #222;
  --text-muted: #555;
  --text-muted-light: #777;
  --accent: #2d6b27;
  --accent-hover: #1e4a1a;
  --border: #ddd;
  --border-light: #eee;
  --topbar-bg: #111;
  --topbar-text: #ccc;
  --topbar-link: #fff;
  --nav-divider: #2d6b27;
  --announcement-green: #2d6b27;
  --table-stripe: #f8f8f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top black bar */
.top-bar {
  background: var(--topbar-bg);
  color: var(--topbar-text);
  font-size: 0.85rem;
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.35rem 1rem;
  text-align: right;
}

.top-bar a {
  color: var(--topbar-link);
  text-decoration: none;
}

.top-bar a:hover {
  text-decoration: underline;
}

/* Main nav – Bulma navbar overrides for Hall of Taps theme */
.main-nav.navbar {
  margin-bottom: 0;
  background: transparent;
  box-shadow: none;
}

.main-nav .navbar-brand .navbar-item.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  background: transparent;
}

.main-nav .navbar-brand .navbar-item.logo:hover {
  color: var(--accent);
  background: transparent;
}

.main-nav .navbar-menu .navbar-item {
  color: var(--text);
}

.main-nav .navbar-menu .navbar-item:hover {
  color: var(--accent);
  background: transparent;
  text-decoration: underline;
}

.main-nav .navbar-burger {
  color: var(--text);
}

.main-nav .navbar-burger:hover {
  background: var(--border-light);
  color: var(--text);
}

.main-nav .navbar-burger span {
  background-color: currentColor;
}

.nav-divider {
  height: 3px;
  background: var(--nav-divider);
  max-width: 1200px;
  margin: 0 auto;
}

/* Legacy nav (if any pages still use) */
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-form input {
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  min-width: 180px;
}

.search-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-btn {
  padding: 0.35rem 0.5rem;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  font-size: 1rem;
}

.search-btn:hover {
  background: var(--border);
}

/* Announcement – works with Bulma section + container */
.announcement.section .container {
  text-align: center;
}

.announcement-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--announcement-green);
  margin: 0 0 0.35em;
}

.announcement-desc {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Main content */
.content-main {
  min-width: 0;
}

.featured-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25em;
  line-height: 1.2;
}

.featured-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.featured-figure {
  margin: 0 0 1rem;
}

.featured-image-placeholder {
  background: linear-gradient(135deg, #e8e4df 0%, #d4cfc8 100%);
  border: 1px solid var(--border);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted-light);
  font-size: 1rem;
}

.featured-image {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 1px solid var(--border);
}

.featured-caption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

.featured-excerpt {
  margin: 0 0 0.75em;
}

.featured-quote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Section headings */
.section-heading,
.sidebar-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
}

/* Article list (more section) */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.article-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
}

.article-list a {
  color: var(--accent);
  text-decoration: none;
}

.article-list a:hover {
  text-decoration: underline;
}

.list-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.more-section {
  margin-top: 2rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 1rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.sidebar-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}

.sidebar-list a {
  color: var(--accent);
  text-decoration: none;
}

.sidebar-list a:hover {
  text-decoration: underline;
}

.sidebar-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.sidebar-block {
  margin-bottom: 1.75rem;
}

.leaderboard-block .table-wrap {
  margin: 0;
}

/* Leaderboard table */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.leaderboard-table th {
  font-weight: 700;
  color: var(--text);
}

.leaderboard-table tbody tr:nth-child(even) {
  background: var(--table-stripe);
}

.leaderboard-table a {
  color: var(--accent);
  text-decoration: none;
}

.leaderboard-table a:hover {
  text-decoration: underline;
}

/* Inner pages – Bulma container handles max-width and padding */
.container.beer-detail-wrap {
  max-width: 900px;
}

/* Typography on inner pages */
.page-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.25rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h3 {
  font-size: 1.1rem;
  margin-top: 1.25em;
  margin-bottom: 0.4em;
}

p {
  margin: 0.75em 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

/* Beers page container */
.container.beers-page {
  max-width: 1000px;
}

/* Tables (beers, breweries) – responsive horizontal scroll */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text);
}

tbody tr:nth-child(even) {
  background: var(--table-stripe);
}

tbody tr:hover td {
  background: var(--border-light);
}

/* Loading / error */
.loading,
.error {
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

.error {
  color: #b33;
  font-style: normal;
}

/* Pagination – segmented pager with « » and page numbers */
.pagination {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.pagination-pager {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}

.pagination-nav,
.pagination-page {
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  background: var(--border-light);
  color: var(--accent);
  min-width: 2.25rem;
}

.pagination-pager .pagination-nav:last-of-type,
.pagination-pager .pagination-page:last-of-type {
  border-right: none;
}

.pagination-nav:hover:not(:disabled),
.pagination-page:hover:not(.is-active) {
  background: #e8e8e8;
  color: var(--accent-hover);
}

.pagination-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-page {
  background: var(--bg);
  color: var(--accent);
}

.pagination-page.is-active {
  background: var(--border-light);
  color: var(--text);
  font-weight: 500;
  cursor: default;
}

.pagination-summary {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--text);
}

.pagination-summary strong {
  font-weight: 700;
  color: var(--text);
}

/* Preview list (if used elsewhere) */
ul.preview-list {
  list-style: none;
  padding-left: 0;
}

ul.preview-list li {
  margin: 0.4em 0;
}

ul.preview-list a {
  color: var(--accent);
}

/* Beer detail page */
.beer-detail-wrap {
  max-width: 900px;
}

.beer-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.beer-label-triage {
  flex-shrink: 0;
}

.beer-label-img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.beer-label-placeholder {
  display: block;
  width: 80px;
  height: 80px;
  background: var(--border-light);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.beer-title-block {
  min-width: 0;
}

.beer-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.15em;
  line-height: 1.2;
  color: var(--text);
}

.beer-by {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.beer-by a {
  color: var(--accent);
}

.beer-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 640px) {
  .beer-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.beer-stat {
  padding: 0 1rem;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.beer-stat:last-child {
  border-right: 0;
}

@media (max-width: 640px) {
  .beer-stat:nth-child(2n) {
    border-right: 0;
  }
}

.beer-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.beer-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.beer-stat-desc {
  font-size: 0.85rem;
  color: var(--text-muted-light);
}

.beer-section {
  margin-bottom: 1.5rem;
}

.beer-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35em;
  color: var(--text);
}

.beer-section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* Beers page – filter panel and leaderboard table */
.beers-page {
  max-width: 1000px;
}

.filter-panel.box {
  margin-bottom: 1.5rem;
  background: var(--table-stripe);
  border: 1px solid var(--border-light);
}

/* Keep filter actions inside container on tablet (buttons get full row) */
.filter-actions-column .field.is-grouped {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-form {
  padding: 0;
}

.filter-row {
  margin-bottom: 0;
}

.filter-row--horizontal {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 1.25rem;
  margin-bottom: 0.875rem;
}

.filter-row--horizontal:last-child {
  margin-bottom: 0;
}

.filter-group {
  flex: 0 1 auto;
  min-width: 0;
}

.filter-group--equal {
  flex: 1 1 0;
  min-width: 120px;
}

.filter-row--horizontal .filter-group:not(.filter-group--equal):not(.filter-group--actions) {
  flex: 0 1 auto;
  min-width: 5rem;
}

.filter-group--actions {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-left: auto;
  padding-bottom: 1px;
}

.filter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.filter-label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted-light);
}

.filter-input,
.filter-select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(45, 107, 39, 0.15);
}

.filter-input::placeholder {
  color: var(--text-muted-light);
}

.filter-range {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filter-range .select,
.filter-range .filter-select {
  width: auto;
  min-width: 5.5rem;
  max-width: 8rem;
}

.filter-range .filter-select {
  padding: 0 0.5rem;
}

.filter-range-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.filter-helper {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  height: 2.25rem;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--nowrap {
  white-space: nowrap;
}

/* Bulma button overrides for primary green */
.button.is-primary,
.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.button.is-primary:hover,
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: var(--border-light);
}

.btn-icon {
  margin-right: 0.35rem;
  font-size: 0.65em;
  opacity: 0.9;
}

/* Beers leaderboard table – green links, sortable headers */
.beers-leaderboard-table {
  font-size: 0.9rem;
}

.beers-leaderboard-table th,
.beers-leaderboard-table td {
  padding: 0.5rem 0.6rem;
  vertical-align: top;
}

.beers-leaderboard-table thead th {
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

.beers-leaderboard-table tbody td a {
  color: var(--accent);
  text-decoration: none;
}

.beers-leaderboard-table tbody td a:hover {
  text-decoration: underline;
}

.beers-col-num {
  width: 2.5rem;
  text-align: right;
  color: var(--text-muted);
}

.beers-col-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.beers-col-sort:hover {
  color: var(--accent);
}

.sort-indicator {
  opacity: 0.4;
  font-size: 0.75em;
}

.col-filter-icon {
  margin-left: 0.2rem;
  opacity: 0.5;
  font-size: 0.85em;
}

/* Beers table: card layout on mobile only */
@media (max-width: 767px) {
  .table-wrap {
    overflow-x: visible;
  }

  .beers-leaderboard-table,
  .beers-leaderboard-table thead,
  .beers-leaderboard-table tbody,
  .beers-leaderboard-table tr,
  .beers-leaderboard-table th,
  .beers-leaderboard-table td {
    display: block;
  }

  .beers-leaderboard-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .beers-leaderboard-table tr.beer-card-row {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .beers-leaderboard-table tr.beer-card-row td {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
  }

  .beers-leaderboard-table tr.beer-card-row td:last-child {
    border-bottom: none;
  }

  .beers-leaderboard-table tr.beer-card-row td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    display: inline-block;
    min-width: 4.5rem;
    margin-right: 0.5rem;
  }

  .beers-leaderboard-table tr.beer-card-row td.beers-col-num::before {
    min-width: 1.5rem;
  }

  /* Loading / no-results row: single cell, no card labels */
  .beers-leaderboard-table tr:not(.beer-card-row) td {
    padding: 1rem;
    border: none;
    text-align: center;
  }

  .beers-leaderboard-table tr:not(.beer-card-row) td::before {
    content: none;
  }
}
