/* Craft Brewery & Cidery Finder — Stylesheet
   Prefix: --bre-
   Cluster: hobby (accent: --tf-accent #9c4221 in light, #e08355 in dark). */

:root {
  --bre-surface: #ffffff;
  --bre-card: #ffffff;
  --bre-border: #e2e8f0;
  --bre-text: #0f172a;
  --bre-muted: #64748b;
  --bre-code-bg: #f8fafc;
  --bre-radius: 4px;
}

.bre-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

.bre-main {
  padding: 16px 0 60px;
}

/* Search Card */
.bre-search-card {
  background: var(--bre-surface);
  border: 1.5px solid var(--bre-border);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.bre-lbl {
  display: block;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--bre-text);
  margin-bottom: 10px;
}

.bre-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .bre-input-row {
    flex-direction: column;
  }
}

.bre-input {
  flex: 1;
  background: var(--bre-surface);
  border: 1.5px solid var(--bre-border);
  color: var(--bre-text);
  padding: 10px 14px;
  border-radius: var(--bre-radius);
  font-size: 0.9375rem;
}

.bre-input:focus,
.bre-select:focus {
  outline: 2px solid var(--tf-accent);
  border-color: var(--tf-accent);
}

.bre-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tf-accent);
  color: var(--tf-accent-ink, #ffffff);
  border: 1px solid var(--tf-accent);
  padding: 10px 18px;
  border-radius: var(--bre-radius);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.bre-btn-primary:hover {
  background: var(--tf-accent-hover);
}

.bre-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--bre-border);
  padding-top: 14px;
  flex-wrap: wrap;
}

.bre-preset-lbl {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bre-muted);
}

.bre-chip {
  background: var(--bre-surface);
  border: 1px solid var(--bre-border);
  color: var(--bre-text);
  padding: 4px 10px;
  border-radius: var(--bre-radius);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.bre-chip:hover {
  border-color: var(--tf-accent);
  color: var(--tf-accent);
}

.bre-filter-btn {
  background: var(--bre-surface);
  border: 1px solid var(--bre-border);
  color: var(--bre-text);
  padding: 6px 12px;
  border-radius: var(--bre-radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.bre-filter-btn:hover {
  border-color: var(--tf-accent);
  color: var(--tf-accent);
}

.bre-filter-btn.active {
  background: var(--tf-accent);
  border-color: var(--tf-accent);
  color: #fff;
}

/* Filter Controls */
.bre-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.bre-type-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bre-counter {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bre-muted);
}

/* Breweries Grid */
.bre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.bre-card-item {
  background: var(--bre-surface);
  border: 1.5px solid var(--bre-border);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bre-card-item:hover {
  border-color: var(--tf-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.bre-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}

.bre-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--bre-text);
  margin: 0;
  line-height: 1.3;
}

.bre-type-pill {
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tf-accent);
  background: var(--tf-accent-wash);
  border: 1px solid var(--tf-accent);
  padding: 2px 6px;
  border-radius: var(--bre-radius);
  white-space: nowrap;
}

.bre-address {
  font-size: 0.8125rem;
  color: var(--bre-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.bre-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--bre-border);
  padding-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.bre-btn-map {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--tf-accent);
  text-decoration: none;
}

.bre-btn-map:hover {
  text-decoration: underline;
}

.bre-web-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bre-muted);
  text-decoration: none;
}

.bre-web-link:hover {
  color: var(--bre-text);
  text-decoration: underline;
}

.bre-ad-container {
  margin-block: 2rem;
  min-height: 280px;
  border: 1px dashed var(--bre-border);
  border-radius: var(--bre-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bre-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: bre-spin 0.6s linear infinite;
}

.bre-spinner-lg {
  width: 20px;
  height: 20px;
  border-width: 2.5px;
  display: block;
  margin: 0 auto 12px;
}

@keyframes bre-spin {
  to { transform: rotate(360deg); }
}

.bre-loading-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bre-muted);
  font-weight: 700;
}

#breSearchBtn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.bre-card-item.bre-flash {
  animation: bre-fade-in 0.25s ease-out;
}

@keyframes bre-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --bre-surface: var(--tf-surface);
  --bre-card: var(--tf-surface);
  --bre-border: var(--tf-surface);
  --bre-text: var(--tf-ink);
  --bre-muted: var(--tf-ink-faint);
  --bre-code-bg: var(--tf-surface);
}
