/**
 * Foreto Job Offers - Network Jobs Display Styles
 * Dedykowane style dla shortcode'a foreto_all_job_offers
 */

/* Główny kontener */
.fjo-network-jobs-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  gap: 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

/* Panel filtrów */
.fjo-filters-panel {
  flex: 0 0 320px;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.fjo-filters-header {
  margin-bottom: 24px;
  border-bottom: 2px solid #f8f9fa;
  padding-bottom: 16px;
}

.fjo-filters-title {
  margin: 0;
  color: #212529;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Formularz filtrów */
.fjo-filters-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Sekcje filtrów */
.fjo-filter-section {
  margin-bottom: 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.fjo-filter-section:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.fjo-filter-section.fjo-active {
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.fjo-filter-section-header {
  padding: 16px 20px;
  background: #f8f9fa;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fjo-filter-section-header:hover {
  background: #e9ecef;
}

.fjo-filter-section.fjo-active .fjo-filter-section-header {
  background: #007bff;
  color: white;
}

.fjo-filter-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fjo-filter-toggle-icon {
  font-size: 18px;
  font-weight: 700;
  color: #6c757d;
}

.fjo-filter-section.fjo-active .fjo-filter-toggle-icon {
  color: white;
}

.fjo-filter-toggle-icon.fjo-rotated {
  transform: rotate(45deg);
}

.fjo-filter-section-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
}

.fjo-filter-section.fjo-active .fjo-filter-section-content {
  padding: 16px 20px;
  max-height: none;
  overflow: visible;
}

/* Checkboxy w filtrach */
.fjo-filter-checkbox-label {
  display: flex;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 4px;
}

.fjo-filter-checkbox-label:hover {
  background: #f8f9fa;
}

.fjo-filter-checkbox-label:last-child {
  margin-bottom: 0;
}

.fjo-filter-checkbox {
  margin-right: 12px;
  width: 16px;
  height: 16px;
  accent-color: #007bff;
}

.fjo-checkbox-text {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
}

/* Przycisk filtrowania */
.fjo-filter-submit-btn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 16px;
}

.fjo-filter-submit-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
}

/* Panel ofert */
.fjo-jobs-panel {
  flex: 1;
  min-width: 0;
}

.fjo-jobs-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Karty ofert */
.fjo-job-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.fjo-job-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.fjo-job-card.fjo-active {
  box-shadow: 0 8px 32px rgba(0, 123, 255, 0.15);
  border-color: #007bff;
}

.fjo-job-card.fjo-active .fjo-job-card-header {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.fjo-job-card-header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.fjo-job-card-header:hover {
  background: #e9ecef;
}

.fjo-job-card.fjo-active .fjo-job-card-header:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
}

.fjo-job-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

.fjo-job-title a {
  color: inherit;
  text-decoration: none;
}

.fjo-job-card.fjo-active .fjo-job-title a {
  color: white;
}

.fjo-job-title a:hover {
  color: #007bff;
}

.fjo-job-card.fjo-active .fjo-job-title a:hover {
  color: #ffffff;
  opacity: 0.9;
}

.fjo-job-location {
  font-size: 14px;
  color: #6c757d;
  margin-left: 16px;
  font-weight: 500;
}

.fjo-job-card.fjo-active .fjo-job-location {
  color: rgba(255, 255, 255, 0.8);
}

.fjo-job-toggle-icon {
  font-size: 20px;
  font-weight: 700;
  color: #6c757d;
}

.fjo-job-card.fjo-active .fjo-job-toggle-icon {
  color: white;
}

.fjo-job-toggle-icon.fjo-rotated {
  transform: rotate(45deg);
}

/* Zawartość karty */
.fjo-job-card-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
}

.fjo-job-card.fjo-active .fjo-job-card-content {
  padding: 24px;
  max-height: none;
}

/* Meta informacje */
.fjo-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9ecef;
}

.fjo-job-salary {
  background: #e8f5e8;
  color: #155724;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.fjo-job-external-url {
  background: #e3f2fd;
  color: #0d47a1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.fjo-job-expiry {
  background: #fff3cd;
  color: #856404;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.fjo-job-external-url a {
  color: inherit;
  text-decoration: none;
}

.fjo-job-external-url a:hover {
  text-decoration: underline;
}

/* Instytuty */
.fjo-job-institutes {
  margin-bottom: 16px;
}

.fjo-institute-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-right: 8px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Obszary, miasta, poziomy doświadczenia */
.fjo-job-areas,
.fjo-job-cities,
.fjo-job-experience-levels {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.fjo-job-areas strong,
.fjo-job-cities strong,
.fjo-job-experience-levels strong {
  color: #495057;
  font-weight: 600;
  margin-right: 8px;
}

/* Nowe pola: Mile widziane, Wymagania, Oczekiwane wyniki, Codzienne zadania, Benefity */
.fjo-job-additionals,
.fjo-job-requirements,
.fjo-job-expected-results,
.fjo-job-responsibilities,
.fjo-job-benefits {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.fjo-job-additionals strong,
.fjo-job-requirements strong,
.fjo-job-expected-results strong,
.fjo-job-responsibilities strong,
.fjo-job-benefits strong {
  color: #495057;
  font-weight: 600;
  margin-right: 8px;
  display: block;
  margin-bottom: 8px;
}

.fjo-job-additionals-content,
.fjo-job-requirements-content,
.fjo-job-expected-results-content,
.fjo-job-responsibilities-content,
.fjo-job-benefits-content {
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 6px;
  border-left: 4px solid #007bff;
  color: #495057;
  margin-top: 4px;
}

.fjo-job-additionals-content {
  border-left-color: #ffc107;
}

.fjo-job-requirements-content {
  border-left-color: #dc3545;
}

.fjo-job-expected-results-content {
  border-left-color: #6610f2;
}

.fjo-job-responsibilities-content {
  border-left-color: #28a745;
}

.fjo-job-benefits-content {
  border-left-color: #17a2b8;
}

/* Fragment treści */
.fjo-job-excerpt {
  margin: 16px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #495057;
}

/* Przyciski akcji */
.fjo-job-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.fjo-job-details-btn,
.fjo-job-apply-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.fjo-job-details-btn {
  background: #6c757d;
  color: white;
}

.fjo-job-details-btn:hover {
  background: #5a6268;
  color: white;
}

.fjo-job-apply-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.fjo-job-apply-btn:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  color: white;
}

/* Paginacja */
.fjo-pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.fjo-page-link {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #ffffff;
  color: #495057;
  text-decoration: none;
  font-weight: 500;
}

.fjo-page-link:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.fjo-page-link.fjo-active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Komunikat o braku ofert */
.fjo-no-jobs {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.fjo-no-jobs p {
  margin: 0;
  font-size: 16px;
  color: #6c757d;
  font-weight: 500;
}

/* Responsywność */
@media (max-width: 1024px) {
  .fjo-network-jobs-wrapper {
    flex-direction: column;
    gap: 24px;
  }

  .fjo-filters-panel {
    flex: none;
    position: static;
  }
}

@media (max-width: 768px) {
  .fjo-network-jobs-wrapper {
    padding: 16px;
    gap: 20px;
  }

  .fjo-filters-panel {
    padding: 20px;
  }

  .fjo-job-card-header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .fjo-job-title {
    font-size: 16px;
  }

  .fjo-job-location {
    margin-left: 0;
  }

  .fjo-job-card-content {
    padding: 20px;
  }

  .fjo-job-meta {
    flex-direction: column;
    gap: 8px;
  }

  .fjo-job-actions {
    flex-direction: column;
  }

  .fjo-job-details-btn,
  .fjo-job-apply-btn {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .fjo-network-jobs-wrapper {
    padding: 12px;
  }

  .fjo-filters-panel,
  .fjo-job-card-content {
    padding: 16px;
  }

  .fjo-filter-section-header,
  .fjo-job-card-header {
    padding: 12px 16px;
  }

  .fjo-filters-title {
    font-size: 18px;
  }

  .fjo-job-title {
    font-size: 15px;
  }
}

/* Loading state */
.fjo-jobs-grid.fjo-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Dostosowania dla różnych motywów */
.wp-content .fjo-network-jobs-wrapper {
  font-family: inherit;
}
