/* company-blocks.css */

/* ------------------------------------
   Company Card (kept for backwards use)
------------------------------------- */

.re-company-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fff;

  width: 100%;
  max-width: 760px;

  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.re-company-card__header {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto;
}

.re-company-card__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #f3f4f6;
  flex: 0 0 auto;
}

.re-company-card__title {
  min-width: 0;
}

.re-company-card__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.re-company-card__location {
  color: #6b7280;
  font-size: 14px;
  margin-top: 2px;
}

.re-company-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.re-company-card__pill {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.re-company-card__pill.is-yes {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.re-company-card__pill.is-no {
  border-color: #fecaca;
  background: #fef2f2;
}

.re-company-card__rating {
  margin-top: 6px;
  font-weight: 600;
}

.re-company-card__ratingSub {
  font-weight: 400;
  color: #6b7280;
  margin-left: 6px;
  font-size: 12px;
}

.re-company-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  flex: 0 0 auto;
}

.re-company-card__item {
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  padding: 8px;
}

.re-company-card__label {
  font-size: 11px;
  color: #6b7280;
}

.re-company-card__value {
  margin-top: 4px;
  font-weight: 600;
  font-size: 14px;
}

.re-company-card__sub {
  font-weight: 400;
  color: #6b7280;
  margin-left: 6px;
  font-size: 12px;
}

.re-company-card__actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
}

.re-company-card__btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.re-company-card__btn--secondary {
  background: #fff;
  color: #111827;
}

/* ------------------------------------
   Companies Table (NEW)
------------------------------------- */

.re-companies-table-wrap {
  width: 100%;
}

.re-companies-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.re-companies-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px; /* forces horizontal scroll on small screens */
}

.re-companies-table thead th {
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  color: #374151;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  white-space: nowrap;
}

.re-companies-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  font-size: 14px;
}

.re-companies-table tbody tr:hover td {
  background: #fcfcfd;
}

.re-table-company {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.re-table-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #f3f4f6;
  flex: 0 0 auto;
}

.re-table-name {
  font-weight: 700;
  line-height: 1.2;
}

.re-table-muted {
  color: #6b7280;
  font-size: 12px;
}

.re-table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.re-table-btn {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid #111827;
}

.re-table-btn.is-primary {
  background: #111827;
  color: #fff;
}

.re-table-btn.is-secondary {
  background: #fff;
  color: #111827;
}

/* Column width hints */
.re-companies-table .col-links { min-width: 220px; }
.re-companies-table .col-price { min-width: 160px; }
.re-companies-table .col-market { min-width: 160px; }
.re-companies-table .col-license { min-width: 160px; }

/* ------------------------------------
   Mobile adjustments (Card only)
------------------------------------- */

@media (max-width: 520px) {
  .re-company-card {
    padding: 14px;
    min-height: unset;
  }

  .re-company-card__header {
    align-items: flex-start;
  }

  .re-company-card__logo {
    width: 48px;
    height: 48px;
  }

  .re-company-card__grid {
    grid-template-columns: 1fr;
  }

  .re-company-card__btn {
    width: 100%;
    text-align: center;
  }
}