.teamtailor-jobs-container {
  margin: 20px 0;
  font-family: "Lato", sans-serif;
}

.teamtailor-jobs-filters {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
}

.teamtailor-jobs-filters select {
  border: 0;
}
.teamtailor-filter-divider {
  margin-left: 10px;
  border: 1px solid #ddd !important;
}

.job-department-filter {
  max-width: 180px;
}

.region-filter {
  max-width: 150px;
}

.teamtailor-jobs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.teamtailor-jobs-table th {
  padding: 14px 10px;
  text-align: left;
  border: 0;
  background-color: #002849;
  font-weight: 700;
  font-size: 18px !important;
  line-height: 26px;
  letter-spacing: 0;
  color: #fff;
}

.teamtailor-jobs-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.pagination-btn:hover:not(.disabled) {
  background: #f5f5f5;
}

.pagination-btn.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

.teamtailor-jobs-table td {
  padding: 12px 15px;
  text-align: left;
  border: 0;
  border-bottom: 2px solid #ddd !important;
}

.teamtailor-jobs-table td[data-label="Date Posted"],
.teamtailor-jobs-table td[data-label="Job Title"],
.teamtailor-jobs-table td[data-label="Department"],
.teamtailor-jobs-table td[data-label="Location"] {
  padding: 12px 15px;
  text-align: left;
  border: 0;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.teamtailor-jobs-table tr td {
  background-color: #fff !important;
}

.teamtailor-jobs-table .job-title {
  font-weight: 400;
  font-size: 24px !important;
  line-height: 26px;
  letter-spacing: 0;
  color: #002849;
}

.teamtailor-jobs-table .job-date-posted,
.teamtailor-jobs-table .job-location,
.teamtailor-jobs-table .job-description,
.teamtailor-jobs-table .job-department {
  font-weight: 400;
  font-size: 18px !important;
  line-height: 26px;
  letter-spacing: 0;
}

.teamtailor-jobs-table .job-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}

.pagination-ellipsis {
  padding: 8px 12px;
  color: #666;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* Error state */
.error {
  text-align: center;
  padding: 20px;
  color: #dc3545;
}

/* Responsive adjustments */
@media screen and (max-width: 820px) {
  .teamtailor-jobs-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .job-department-filter,
  .region-filter {
    width: 100%;
    max-width: none;
    margin-bottom: 10px;
  }

  .teamtailor-filter-divider {
    display: none;
  }

  /* Table to card transformation with headers */
  .teamtailor-jobs-table {
    display: block;
  }

  .teamtailor-jobs-table thead {
    display: none;
  }

  .teamtailor-jobs-table tbody {
    display: block;
  }

  .teamtailor-jobs-table tr {
    display: block;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    background: #fff;
    padding-bottom: 20px;
  }

  .teamtailor-jobs-table td {
    display: block;
    padding: 8px 0;
    text-align: left;
    border: none !important;
    position: relative;
  }

  .teamtailor-jobs-table td:before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #002849;
    font-size: 14px !important;
  }

  .teamtailor-jobs-table .job-title:before {
    display: none;
  }

  .teamtailor-jobs-table .job-description {
    max-width: 100%;
    -webkit-line-clamp: 3;
    margin: 0;
  }

  /* Filter dropdown improvements */
  .filter-dropdown {
    width: 100%;
  }

  .filter-dropdown-btn {
    width: 100%;
    min-width: unset;
    padding: 10px 20px 10px 0 !important;
  }

  .filter-dropdown-content {
    width: 100%;
    min-width: unset;
    position: fixed;
    left: 0;
    right: 0;
    max-height: 80vh;
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }

  .filter-option {
    padding: 15px 20px;
  }

  .filter-option label {
    font-size: 16px !important;
  }

  .pagination-btn {
    padding: 8px;
    min-width: 35px;
    font-size: 14px !important;
  }

  .teamtailor-jobs-pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-reset-container {
    margin-top: 10px;
  }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
  .teamtailor-jobs-table .job-title {
    font-size: 18px !important;
  }

  .teamtailor-jobs-table td {
    padding: 6px 0;
  }

  .teamtailor-jobs-table td:before {
    font-size: 13px !important;
  }

  .teamtailor-jobs-table .job-description {
    -webkit-line-clamp: 2;
  }

  .filter-dropdown-content {
    max-height: 70vh;
  }

  .pagination-btn {
    padding: 6px;
    min-width: 30px;
    font-size: 13px !important;
  }
}

/* Ensure smooth scrolling for all devices */
* {
  -webkit-overflow-scrolling: touch;
}

.filter-dropdown {
  position: relative;
  display: inline-block;
}

.filter-dropdown-btn {
  background: #fff;
  border-style: none !important;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 180px;
  transition: all 0.3s ease;
}

.filter-dropdown-btn:hover {
  border-color: #0073aa;
}

.filter-dropdown-btn .filter-arrow {
  margin-left: 10px;
  font-size: 12px !important;
}

.filter-dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 250px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow-y: auto;
}

.filter-dropdown-content.show {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-options {
  padding: 5px 0;
}

.filter-option {
  padding: 10px 20px;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-option:last-child {
  border-bottom: none;
}

.filter-option:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.filter-option input[type="checkbox"] {
  margin-right: 10px;
  margin-top: 2px;
  accent-color: #002849;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.filter-option input[type="checkbox"]:checked,
.filter-option .filter-selected input[type="checkbox"] {
  opacity: 1;
}

.filter-option label {
  cursor: pointer;
  flex-grow: 1;
  font-weight: 400;
  font-size: 18px !important;
  line-height: 1.4 !important;
  letter-spacing: 0;
  padding-top: 1px;
}

.filter-selected {
  background-color: rgba(0, 115, 170, 0.1);
}

.filter-selected label {
  color: #1e90b3;
  font-weight: 500;
}

.filter-reset-container {
  display: flex;
  align-items: center;
}

.filter-reset-btn {
  background: #fff;
  border: 1px solid #000 !important;
  padding: 10px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  color: #000 !important;
  border-radius: 0 !important;
}

.filter-reset-btn:hover {
  border-color: #0073aa;
  color: #0073aa;
  background: #f5f5f5;
}

.filter-reset-btn .reset-text {
  font-size: 18px !important;
  font-weight: 500;
  line-height: 160%;
  letter-spacing: 0;
}

.label-count-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-badge {
  display: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  background-color: #002849;
  color: #fff;
  font-size: 12px !important;
  line-height: 20px;
  text-align: center;
  flex-shrink: 0;
}

.filter-badge.show {
  display: flex;
  align-items: center;
  justify-content: center;
}
