/* Foreto Job Offers - Network Display Styles */

.foreto-all-jobs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  gap: 30px;
}

/* Accordion Layout */
.foreto-filters-sidebar {
  flex: 0 0 300px;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  height: fit-content;
}

.foreto-jobs-main {
  flex: 1;
  min-width: 0;
}

/* Filtry w accordionach */
.foreto-job-filters {
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-bottom: 0;
  border: none;
}

.foreto-job-filters h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#foreto-job-filters-form {
  display: block;
  gap: 0;
  align-items: stretch;
}

.filter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  transition: border-color 0.3s;
}

.filter-group select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.filter-submit {
  background: #0073aa;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s;
  width: 100%;
  margin-top: 10px;
}

/* Accordiony filtrów */
.filter-accordion {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  overflow: hidden;
}

.filter-accordion-header {
  padding: 15px 20px;
  background: #f8f9fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s;
  border-bottom: 1px solid #e0e0e0;
}

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

.filter-accordion.active .filter-accordion-header {
  background: #0073aa;
  color: white;
}

.filter-accordion-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-expand-icon {
  font-size: 18px;
  font-weight: bold;
  color: #666;
  transition: transform 0.3s;
}

.filter-accordion.active .filter-expand-icon {
  color: white;
}

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

.filter-accordion-content {
  display: none;
  padding: 15px 20px;
  background: white;
}

.filter-accordion.active .filter-accordion-content {
  display: block;
}

/* Checkboxy filtrów */
.filter-checkbox-label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: color 0.3s;
}

.filter-checkbox-label:hover {
  color: #0073aa;
}

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

.filter-checkbox {
  margin-right: 10px;
  width: 16px;
  height: 16px;
  accent-color: #0073aa;
}

.checkbox-text {
  flex: 1;
  line-height: 1.4;
}

.filter-submit:hover {
  background: #005a87;
}

/* Oferty w accordionach */
.foreto-jobs-grid {
  display: block;
  gap: 0;
  margin-bottom: 0;
}

.job-card {
  background: white;
  border: 1px solid #e1e1e1;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: none;
  margin-bottom: 1px;
  position: relative;
}

.job-card:first-child {
  border-radius: 8px 8px 0 0;
}

.job-card:last-child {
  border-radius: 0 0 8px 8px;
  margin-bottom: 0;
}

.job-card:only-child {
  border-radius: 8px;
}

.job-card.active {
  background: #0073aa;
  color: white;
  border-color: #0073aa;
}

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

.job-card-header {
  padding: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s;
}

.job-card.active .job-card-header {
  background: #0073aa;
}

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

.job-card.active .job-card-header:hover {
  background: #005a87;
}

.job-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.job-title a {
  color: #333;
  text-decoration: none;
  display: block;
}

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

.job-location {
  color: #666;
  font-size: 14px;
  margin-left: 15px;
  font-weight: 500;
}

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

.job-expand-icon {
  margin-left: 15px;
  font-size: 18px;
  color: #999;
  transition: transform 0.3s;
}

.job-card.active .job-expand-icon {
  color: white;
  transform: rotate(45deg);
}

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

.job-card-content {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid #e1e1e1;
  background: white;
}

.job-card.active .job-card-content {
  display: block;
}

.job-meta {
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-salary {
  background: #e8f5e8;
  color: #2d5a2d;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.job-external-url {
  color: #0073aa;
  font-size: 14px;
}

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

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

.job-institutes {
  margin: 15px 0;
}

.institute-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  color: white;
}

.job-areas,
.job-cities,
.job-experience-levels {
  margin: 10px 0;
}

.job-areas strong,
.job-cities strong,
.job-experience-levels strong {
  display: block;
  margin-bottom: 5px;
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.area-badge,
.city-badge,
.experience-level-badge {
  display: inline-block;
  background: #f0f0f0;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  margin-right: 5px;
  margin-bottom: 3px;
  color: #555;
}

.job-excerpt {
  margin: 15px 0;
  color: #666;
  line-height: 1.6;
  font-size: 14px;
}

.job-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.job-details-btn,
.job-apply-btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.job-details-btn {
  background: #f0f0f0;
  color: #333;
}

.job-details-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.job-apply-btn {
  background: #28a745;
  color: white;
}

.job-apply-btn:hover {
  background: #218838;
  color: white;
}

/* Paginacja */
.foreto-pagination {
  text-align: center;
  margin-top: 30px;
}

.page-link {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 2px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.page-link:hover {
  background: #e0e0e0;
}

.page-link.active {
  background: #0073aa;
  color: white;
}

/* Responsywność */
@media (max-width: 768px) {
  .foreto-all-jobs-container {
    flex-direction: column;
    padding: 10px;
  }

  .foreto-filters-sidebar {
    flex: none;
    width: 100%;
    margin-bottom: 20px;
  }

  .foreto-jobs-main {
    flex: none;
  }

  #foreto-job-filters-form {
    flex-direction: column;
  }

  .filter-group {
    min-width: auto;
  }

  .job-card-header {
    padding: 15px;
  }

  .job-title {
    font-size: 14px;
  }

  .job-location {
    font-size: 12px;
  }
}

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

/* Empty state */
.foreto-jobs-grid .no-jobs {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
  background: white;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
}

/* Nazwa strony w tytule oferty */
.job-site-name {
  font-size: 0.8em;
  color: #666;
  font-weight: normal;
  font-style: italic;
}

/* Styl dla archiwum multisite */
.archive.foreto_job_offer .job-card {
  border-left: 4px solid #0073aa;
}

.archive.foreto_job_offer .job-card[data-site-id] {
  border-left-color: var(--site-color, #0073aa);
}

/* Style dla pojedynczych ofert pracy */
.job-offer-single {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.job-offer-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.job-offer-title {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: #333;
}

.job-offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.job-offer-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.job-apply-btn,
.job-back-btn {
  display: inline-block;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s;
}

.job-apply-btn {
  background: #28a745;
  color: white;
}

.job-apply-btn:hover {
  background: #218838;
  color: white;
}

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

.job-back-btn:hover {
  background: #545b62;
  color: white;
}

.job-application-section {
  margin-top: 40px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.job-application-section h2 {
  margin-bottom: 20px;
  color: #333;
}

/* Responsywność dla pojedynczych ofert */
@media (max-width: 768px) {
  .job-offer-single {
    padding: 15px;
  }

  .job-offer-title {
    font-size: 2em;
  }

  .job-offer-meta {
    flex-direction: column;
    gap: 15px;
  }

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

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