/* 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 260px;
  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;
  font-weight: 500;
}

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

.jw-companies-search-industry {
  flex: 0 1 280px;
  min-width: 240px;
  position: relative;
  z-index: 4;
}

.jw-companies-search-industry.is-open {
  border-color: #93b4f7;
  box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.12);
  z-index: 20;
}

.jw-companies-search-industry .jw-companies-industry-select-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.jw-companies-search-industry .jw-companies-industry-container,
.jw-companies-search-industry .select2-container {
  width: 100% !important;
  display: block;
}

.jw-companies-search-industry .jw-companies-industry-container .select2-selection--single,
.jw-companies-search-industry .jw-modal-select2-container .select2-selection--single,
.jw-companies-search-industry .select2-container--default .select2-selection--single {
  height: 46px !important;
  min-height: 46px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
}

.jw-companies-search-industry .jw-companies-industry-container .select2-selection--single .select2-selection__rendered,
.jw-companies-search-industry .jw-modal-select2-container .select2-selection--single .select2-selection__rendered,
.jw-companies-search-industry .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 46px !important;
  height: 46px !important;
  padding: 0 24px 0 0 !important;
  margin: 0 !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
}

.jw-companies-search-industry .jw-companies-industry-container .select2-selection--single .select2-selection__placeholder,
.jw-companies-search-industry .jw-modal-select2-container .select2-selection--single .select2-selection__placeholder,
.jw-companies-search-industry .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #9ca3af !important;
}

.jw-companies-search-industry .jw-companies-industry-container .select2-selection--single .select2-selection__arrow,
.jw-companies-search-industry .jw-modal-select2-container .select2-selection--single .select2-selection__arrow,
.jw-companies-search-industry .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px !important;
  top: 0 !important;
  right: 0 !important;
}

.jw-companies-search-industry .jw-companies-industry-container.select2-container--open .select2-selection--single,
.jw-companies-search-industry .jw-modal-select2-container.select2-container--open .select2-selection--single,
.jw-companies-search-industry .select2-container--default.select2-container--open .select2-selection--single {
  border: none !important;
  box-shadow: none !important;
}

.jw-companies-search-industry .select2-selection__clear {
  display: none !important;
}

.jw-companies-industry-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0 2px 0 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}

.jw-companies-industry-clear:hover,
.jw-companies-industry-clear:focus {
  color: #6b7280;
  background: #f3f4f6;
  outline: none;
}

.jw-companies-industry-clear i {
  font-size: 14px;
}

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

.jw-companies-search-industry.has-industry-selected .jw-companies-industry-container .select2-selection--single .select2-selection__rendered,
.jw-companies-search-industry.has-industry-selected .jw-modal-select2-container .select2-selection--single .select2-selection__rendered,
.jw-companies-search-industry.has-industry-selected .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-right: 8px !important;
}

.jw-companies-search-industry.has-industry-selected .jw-companies-industry-container .select2-selection--single .select2-selection__arrow,
.jw-companies-search-industry.has-industry-selected .jw-modal-select2-container .select2-selection--single .select2-selection__arrow,
.jw-companies-search-industry.has-industry-selected .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none !important;
}

.select2-dropdown.jw-companies-industry-dropdown {
  z-index: 1070 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
  overflow: hidden !important;
  padding: 4px 0 !important;
}

.select2-dropdown.jw-companies-industry-dropdown .select2-results > .select2-results__options {
  max-height: 280px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.select2-dropdown.jw-companies-industry-dropdown .select2-results__option {
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: #111827 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.select2-dropdown.jw-companies-industry-dropdown .select2-search--dropdown {
  display: none !important;
}

.select2-dropdown.jw-modal-select2-dropdown.jw-companies-industry-dropdown .select2-results__option--highlighted[aria-selected],
.select2-dropdown.jw-companies-industry-dropdown .select2-results__option--highlighted[aria-selected] {
  background: #eff6ff !important;
  color: #111827 !important;
}

.select2-dropdown.jw-companies-industry-dropdown .select2-results__option[aria-selected="true"] {
  background: #dbeafe !important;
  color: #0a65cc !important;
  font-weight: 600;
}

.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-clear-btn--hidden {
  display: none !important;
}

.jw-companies-search-btn {
  cursor: pointer;
}

.jw-companies-clear-btn {
  cursor: pointer;
}

.jw-companies-search-btn.is-loading .jw-companies-search-btn-label {
  opacity: 0.75;
}

.jw-companies-results-wrap.is-searching {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.jw-companies-search.is-searching .jw-companies-search-field input {
  pointer-events: 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: 3 columns desktop (1200px+), 2 tablet, 1 mobile */
.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;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 14px;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

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

.jw-company-card__top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 16px 12px;
  min-width: 0;
}

.jw-company-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.jw-company-card__identity:hover,
.jw-company-card__identity:focus {
  text-decoration: none;
  color: inherit;
}

.jw-company-card__follow {
  flex-shrink: 0;
  margin-top: 2px;
}

.jw-company-card__follow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #0a65cc;
  background: #fff;
  color: #0a65cc;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.jw-company-card__follow-btn:hover,
.jw-company-card__follow-btn:focus {
  background: #eff6ff;
  border-color: #084fa3;
  color: #084fa3;
  text-decoration: none;
}

.jw-company-card__follow-btn.is-following {
  border-color: #bfdbfe;
  color: #0a65cc;
  background: #fff;
}

.jw-company-card__follow-btn.is-following .fa-heart {
  color: #0a65cc;
}

.jw-company-card__follow-btn.is-following:hover,
.jw-company-card__follow-btn.is-following:focus {
  background: #eff6ff;
  border-color: #084fa3;
  color: #084fa3;
}

.jw-company-card.is-removing {
  opacity: 0.45;
  pointer-events: none;
}

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

.jw-company-card__logo {
  display: block;
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  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: 64px;
  height: 64px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.jw-company-card__logo-wrap .jw-company-avatar--logo {
  background: #fff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
}

.jw-company-card__logo-wrap .jw-company-avatar--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.jw-cd-hero__logo-wrap .jw-company-avatar--logo {
  background: #fff;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
}

.jw-cd-hero__logo-wrap .jw-company-avatar--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.jw-company-card__meta {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.jw-company-card__name {
  margin: 0 0 4px;
  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;
}

.jw-company-card__industry {
  margin: 0 0 4px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jw-company-card__location {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.jw-company-card__location span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: 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: 12px 16px 16px;
  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: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  line-height: 1.2;
}

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

.jw-company-card__view {
  font-size: 13px;
  font-weight: 600;
  color: #0a65cc;
  white-space: nowrap;
  text-decoration: none;
}

.jw-company-card__view:hover,
.jw-company-card__view:focus {
  color: #084fa3;
  text-decoration: none;
}

.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: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !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: 1199.98px) {
  .jw-companies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .jw-companies-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .jw-companies-search-field {
    flex: 1 1 100%;
  }

  .jw-companies-search-industry {
    flex: 1 1 100%;
    min-width: 0;
  }
}

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

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

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

  .jw-companies-search-industry {
    flex: 1 1 100%;
    min-width: 0;
  }

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

  .jw-company-card__top {
    flex-direction: column;
    align-items: stretch;
  }

  .jw-company-card__follow {
    align-self: flex-start;
    margin-top: 0;
  }

  .jw-company-card__follow-btn {
    width: 100%;
  }
}
