/* Companies listing — JobBricks workspace theme */
.jw-companies-page {
  padding: 24px 0 56px;
  background: #f4f6f9;
  min-height: calc(100vh - 120px);
}

.jw-companies-page .container {
  max-width: 1200px;
}

.jw-companies-inner {
  width: 100%;
}

.jw-companies-hero {
  margin-bottom: 24px;
}

.jw-companies-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.jw-companies-hero p {
  margin: 0 0 18px;
  font-size: 15px;
  color: #6b7280;
  max-width: 560px;
  line-height: 1.5;
}

.jw-companies-search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  max-width: 720px;
}

.jw-companies-search-field {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  margin: 0;
  position: relative;
}

.jw-companies-search-typeahead .typeahead.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 1050;
}

.jw-companies-search-typeahead .typeahead.dropdown-menu > li > a {
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  white-space: normal;
}

.jw-companies-search-typeahead .typeahead.dropdown-menu > .active > a,
.jw-companies-search-typeahead .typeahead.dropdown-menu > li > a:hover {
  background: #eff6ff;
  color: #111827;
}

.jw-companies-search-typeahead .typeahead.dropdown-menu > li > a {
  padding: 8px 12px;
}

.jw-company-ta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.jw-company-ta-thumb {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.jw-company-ta-thumb img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  display: block;
}

.jw-company-ta-thumb--letter {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border: none;
}

.jw-company-ta-thumb--loc {
  color: #0a65cc;
  background: #eff6ff;
  border-color: #cfe0ff;
  font-size: 13px;
}

.jw-company-ta-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #111827;
  white-space: normal;
  word-break: break-word;
}

.jw-company-ta-text strong {
  font-weight: 700;
  color: #0a65cc;
}

.jw-companies-search-field i {
  color: #9ca3af;
  font-size: 16px;
}

.jw-companies-search-field input {
  flex: 1;
  border: none;
  outline: none;
  height: 48px;
  font-size: 15px;
  color: #111827;
  background: transparent;
  box-shadow: none;
}

.jw-companies-search-field input::placeholder {
  color: #9ca3af;
}

.jw-companies-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #0a65cc;
  cursor: pointer;
  transition: background 0.15s ease;
}

.jw-companies-search-btn:hover {
  background: #084fa3;
}

.jw-companies-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  min-height: 48px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #0a65cc;
  background: #fff;
  border: 1px solid #cfe0ff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.jw-companies-clear-btn:hover,
.jw-companies-clear-btn:focus {
  background: #eff6ff;
  border-color: #93b4f7;
  color: #084fa3;
  text-decoration: none;
}

.jw-companies-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #6b7280;
}

.jw-companies-meta strong {
  color: #111827;
  font-weight: 600;
}

/* Grid: equal-height cards per row */
.jw-companies-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.jw-company-card {
  margin: 0;
  padding: 0;
  min-width: 0;
  height: 100%;
  display: flex;
}

.jw-company-card__link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  flex: 1;
  min-height: 148px;
  height: 100%;
  padding: 16px;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.jw-company-card__link:hover {
  border-color: #93b4f7;
  box-shadow: 0 8px 24px rgba(10, 101, 204, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.jw-company-card__logo-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0;
  flex-shrink: 0;
}

.jw-company-card__logo {
  display: block;
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.jw-company-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.jw-company-card__body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.jw-company-card__name {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.35 * 16px);
}

.jw-company-card__location {
  margin: 0 0 10px;
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.4;
  min-height: calc(2 * 1.4 * 13px);
  flex-shrink: 0;
}

.jw-company-card__location span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jw-company-card__location--empty {
  visibility: hidden;
}

.jw-company-card__location i {
  margin-top: 2px;
  color: #9ca3af;
  flex-shrink: 0;
  font-size: 12px;
}

.jw-company-card__footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.jw-company-card__jobs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  line-height: 1.2;
}

.jw-company-card__jobs--active {
  color: #0a65cc;
  background: #eff6ff;
}

.jw-company-card__cta {
  font-size: 12px;
  font-weight: 600;
  color: #0a65cc;
  white-space: nowrap;
}

.jw-company-card__link:hover .jw-company-card__cta {
  color: #084fa3;
}

.jw-companies-empty {
  text-align: center;
  padding: 56px 24px;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed #d1d5db;
}

.jw-companies-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: #eff6ff;
  color: #0a65cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.jw-companies-empty h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.jw-companies-empty p {
  margin: 0 0 20px;
  font-size: 15px;
  color: #6b7280;
}

/* Override legacy Bootstrap / main.css list & image rules inside this page */
.jw-companies-page .jw-companies-grid > li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  float: none;
  width: auto;
  min-height: 0;
}

.jw-companies-page .jw-company-card__logo,
.jw-companies-page .jw-company-card__logo img {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
}

.jw-companies-loadmore {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding-top: 8px;
}

.jw-companies-loadmore--hidden {
  display: none !important;
}

.jw-companies-loadmore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #fff;
  color: #0a65cc;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.jw-companies-loadmore-btn:hover,
.jw-companies-loadmore-btn:focus {
  background: #eff6ff;
  border-color: #93b4f7;
  color: #084fa3;
  outline: none;
  box-shadow: 0 4px 12px rgba(10, 101, 204, 0.12);
}

.jw-companies-loadmore-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.jw-companies-loadmore-btn.is-loading .jw-companies-loadmore-label {
  opacity: 0.85;
}

.jw-companies-list-root.is-loading-more .jw-companies-grid {
  opacity: 0.92;
}

@media (max-width: 991.98px) {
  .jw-companies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .jw-companies-page {
    padding-top: 20px;
  }

  .jw-companies-hero h1 {
    font-size: 24px;
  }

  .jw-companies-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .jw-companies-search-btn {
    width: 100%;
  }

  .jw-company-card__link {
    padding: 14px;
  }
}
