/* ─────────────────────────────────────────────────────────────────────────────
   Design tokens
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --brand:              #4f6bed;
  --brand-dark:         #3a55d4;
  --brand-light:        #eef2ff;
  --text-dark:          #111827;
  --text-mid:           #4b5563;
  --text-muted:         #9ca3af;
  --border:             #e5e7eb;
  --card-shadow:        0 1px 4px rgba(0,0,0,0.06);
  --card-shadow-hover:  0 8px 24px rgba(0,0,0,0.10);
  --card-radius:        12px;
}


/* ─────────────────────────────────────────────────────────────────────────────
   Page wrapper
   ───────────────────────────────────────────────────────────────────────────── */

.provider_list {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 48px;
  font-size: 15px;
}


/* ─────────────────────────────────────────────────────────────────────────────
   Category header
   ───────────────────────────────────────────────────────────────────────────── */

.category-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}


/* ─────────────────────────────────────────────────────────────────────────────
   City filter chips
   ───────────────────────────────────────────────────────────────────────────── */

.city-filter        { margin-top: 16px; }

.city-filter__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.city-filter__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-chip {
  display: inline-block;
  padding: 5px 14px;
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid #c7d0f8;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.city-chip:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  text-decoration: none;
}


/* ─────────────────────────────────────────────────────────────────────────────
   Company count badge
   ───────────────────────────────────────────────────────────────────────────── */

.company-count {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 20px;
}


/* ═════════════════════════════════════════════════════════════════════════════
   BIZ-CARD — two-panel listing item
   ═════════════════════════════════════════════════════════════════════════════ */

/* ── Shell ────────────────────────────────────────────────────────────────── */

.biz-card {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.biz-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}


/* ── Left sidebar ─────────────────────────────────────────────────────────── */

.biz-card__sidebar {
  width: 116px;
  flex-shrink: 0;
  background: #f9fafb;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 12px;
  text-align: center;
}

/* Sidebar colour shifts with rating */
.biz-card--great .biz-card__sidebar { background: #f0fdf4; border-right-color: #86efac; }
.biz-card--good  .biz-card__sidebar { background: #eff6ff; border-right-color: #93c5fd; }
.biz-card--ok    .biz-card__sidebar { background: #fffbeb; border-right-color: #fde68a; }
.biz-card--low   .biz-card__sidebar { background: #fff1f2; border-right-color: #fca5a5; }


/* ── Logo ─────────────────────────────────────────────────────────────────── */

.biz-card__logo-wrap {
  margin: 0;
}

.biz-card__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.07);
  background: #fff;
  display: block;
}


/* ── Score badge ──────────────────────────────────────────────────────────── */

.biz-card__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.biz-card__score-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: #374151;
}

/* Score number colour follows rating */
.biz-card--great .biz-card__score-num { color: #16a34a; }
.biz-card--good  .biz-card__score-num { color: #2563eb; }
.biz-card--ok    .biz-card__score-num { color: #d97706; }
.biz-card--low   .biz-card__score-num { color: #dc2626; }

.biz-card__score-star {
  font-size: 14px;
  color: #f59e0b;
  line-height: 1;
}

.biz-card__score-sources {
  display: flex;
  gap: 3px;
  margin-top: 5px;
}

.biz-card__badge {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
}

.biz-card__badge--google { background: #4285f4; }
.biz-card__badge--fb     { background: #1877f2; }


/* ── Right body ───────────────────────────────────────────────────────────── */

.biz-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.biz-card__main {
  flex: 1;
  padding: 18px 20px 14px;
}


/* ── Company name ─────────────────────────────────────────────────────────── */

.biz-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px;
  line-height: 1.25;
  transition: color 0.15s;
}

.biz-card:hover .biz-card__name {
  color: var(--brand);
}


/* ── Address ──────────────────────────────────────────────────────────────── */

.biz-card__address {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}


/* ── Contact chips ────────────────────────────────────────────────────────── */

.biz-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.biz-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.biz-card__chip:hover {
  background: var(--brand-light);
  border-color: #c7d0f8;
  color: var(--brand);
  text-decoration: none;
}

.biz-card__chip--phone {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.biz-card__chip--phone:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}


/* ── Description ──────────────────────────────────────────────────────────── */

.biz-card__description {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ── Footer ───────────────────────────────────────────────────────────────── */

.biz-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}

.biz-card__ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.biz-card__rating {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s;
}

.biz-card__rating:hover {
  opacity: 0.85;
  color: #fff;
  text-decoration: none;
}

.biz-card__rating--google { background: #4285f4; }
.biz-card__rating--fb     { background: #1877f2; }

.biz-card__map-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.biz-card__map-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}


/* ── Admin strip ──────────────────────────────────────────────────────────── */

.biz-card .admin-actions {
  margin-bottom: 6px;
}

.biz-card .admin-actions a {
  font-size: 11px;
  color: #d1d5db;
  text-decoration: underline;
  margin-right: 8px;
}


/* ─────────────────────────────────────────────────────────────────────────────
   companies/show.html.erb retained styles
   ───────────────────────────────────────────────────────────────────────────── */

.companies                           { max-width: 1200px; margin: 0 auto; }
.company-snapshot                    { width: 100px; }
.company__info_time-address-heading  { margin: 10px 0 0; }
.company-coordinates dt              { font-weight: 600; font-size: 13px; color: #666; }
.company-coordinates dd              { margin: 0 0 4px; }
.forex__btn_items                    { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.forex__btn_items-label              { padding: 6px 12px; font-weight: 600; white-space: nowrap; }
.forex__btn_items-list               { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.forex__btn_item                     { display: inline-block; padding: 6px 14px; border: 1px solid #ccc; border-radius: 20px; font-size: 14px; color: #333; text-decoration: none; white-space: nowrap; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.forex__btn_item:hover,
.forex__btn_item:focus               { background: #0073e6; color: #fff; border-color: #0073e6; outline: none; }
.company-categories                  { list-style: none; padding: 0; margin: 0; }
.company-categories li               { margin-bottom: 4px; }


/* ─────────────────────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  /* Sidebar collapses to a top horizontal bar */
  .biz-card {
    flex-direction: column;
  }

  .biz-card__sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    gap: 14px;
  }

  /* Tint carries through on the top bar */
  .biz-card--great .biz-card__sidebar { border-bottom-color: #86efac; }
  .biz-card--good  .biz-card__sidebar { border-bottom-color: #93c5fd; }
  .biz-card--ok    .biz-card__sidebar { border-bottom-color: #fde68a; }
  .biz-card--low   .biz-card__sidebar { border-bottom-color: #fca5a5; }

  .biz-card__logo {
    width: 52px;
    height: 52px;
  }

  /* Score reads horizontally next to logo */
  .biz-card__score {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .biz-card__score-num  { font-size: 22px; }
  .biz-card__score-star { font-size: 12px; }

  .biz-card__main {
    padding: 14px 14px 12px;
  }

  .biz-card__footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 14px;
  }

  .provider_list {
    padding: 0 8px 24px;
  }

  .city-filter__list {
    gap: 6px;
  }
}
