/* Carbomap-specific styles (loaded only on /carbomap/). */

.cb-notice {
  background: #fff8e1;
  border: 1px solid #f0d98c;
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: #6b5900;
}

/* Toolbar: view toggle + filters */
.cb-toolbar { margin: 1.25rem 0; }

.cb-views { display: inline-flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; margin-bottom: 0.9rem; }
.cb-views button {
  border: 0; background: #fff; color: var(--muted);
  padding: 0.35rem 0.9rem; cursor: pointer; font: inherit;
}
.cb-views button + button { border-left: 1px solid var(--rule); }
.cb-views button.active { background: #1a1a1a; color: #fff; }

.cb-filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: end; }
.cb-filters label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); gap: 0.2rem; }
.cb-filters select, .cb-filters input[type="range"] { font: inherit; font-size: 0.95rem; }
.cb-filters input[type="range"] { width: 9rem; }
.cb-filters output { font-size: 0.85rem; color: var(--fg); }
.cb-filters button#f-reset { align-self: end; background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 0.3rem 0.7rem; cursor: pointer; font: inherit; color: var(--muted); }
.cb-filters button#f-reset:hover { color: var(--fg); }
.cb-count { font-size: 0.85rem; color: var(--muted); margin: 0.6rem 0 0; }

/* Map */
.cb-map { width: 100%; height: 70vh; min-height: 360px; border: 1px solid var(--rule); border-radius: 4px; }

/* List */
.cb-list { display: grid; gap: 1.1rem; }
.cb-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 0.9rem;
  border: 1px solid var(--rule); border-radius: 6px; padding: 0.8rem;
  cursor: pointer; transition: border-color 0.15s;
}
.cb-card:hover { border-color: #bbb; }
.cb-card-img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; background: #f0f0f0; }
.cb-card-noimg { display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #aaa; }
.cb-card-body h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.cb-empty { color: var(--muted); }

/* Shared meta line (list + popup) */
.cb-loc { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.85rem; }
.cb-rate { margin: 0 0 0.3rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.cb-num { color: var(--muted); font-size: 0.9rem; }
.cb-price { font-weight: 600; }
.cb-badges { margin: 0 0 0.4rem; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.cb-note { font-size: 0.9rem; }
.cb-note p { margin: 0.3rem 0 0; }

/* Badges */
.cb-badge { font-size: 0.72rem; padding: 0.1rem 0.45rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.cb-badge.yes { background: #e8f5e9; color: #1b5e20; border-color: #b6dbb8; }       /* real guanciale */
.cb-badge.no { background: #f3f3f3; color: #888; border-color: #e0e0e0; }            /* no guanciale */
.cb-badge.cream { background: #fff3e0; color: #8a5a00; border-color: #f0d9b0; }      /* has cream */
.cb-badge.nocream { background: #e8f5e9; color: #1b5e20; border-color: #b6dbb8; }    /* no cream (purist) */

/* Fractional star rating: grey base + clipped gold overlay */
.stars { position: relative; display: inline-block; color: #d8d8d8; font-size: 1rem; line-height: 1; }
.stars::before { content: "★★★★★"; }
.stars-fill { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: #f2b01e; }
.stars-fill::before { content: "★★★★★"; }

/* Google InfoWindow popup contents */
.cb-pop { max-width: 240px; }
.cb-pop h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.cb-pop-img { width: 100%; height: 130px; object-fit: cover; border-radius: 4px; margin-bottom: 0.5rem; }

@media (max-width: 480px) {
  .cb-card { grid-template-columns: 72px 1fr; }
  .cb-card-img { width: 72px; height: 72px; }
  .cb-map { height: 60vh; }
}
