/**
 * DST Jobs List - Styles
 * 
 * Sidebar filters + Grid layout + Mobile overlay
 * 
 * @package DstDesign Theme
 * @since 1.0.0
 */

/* ===================================
   WRAPPER & LAYOUT
   =================================== */
.dst-jobs-list-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===================================
   MOBILE FILTER TOGGLE BUTTON
   =================================== */
.dst-jobs-mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    background: #FDB227;
    color: #000;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 0 11px 0 rgba(194, 0, 0, 0.40);
    transition: transform 0.2s ease;
}

.dst-jobs-mobile-filter-toggle:hover {
    transform: scale(1.05);
}

.dst-jobs-mobile-filter-toggle svg {
    flex-shrink: 0;
}

/* ===================================
   SIDEBAR (FILTERS)
   =================================== */
.dst-jobs-sidebar {
    background: #0B0D15;
    padding: 30px;
    border-radius: 10px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.dst-jobs-sidebar-inner {
    position: relative;
}

.dst-jobs-sidebar-title {
    font-size: 24px;
    font-weight: 700;
    color: #FDB227;
    margin: 0 0 30px 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dst-filters-updating {
    display: inline-flex;
    animation: dst-spin 1s linear infinite;
}

.dst-filters-updating svg {
    width: 16px;
    height: 16px;
    color: #FDB227;
}

/* Mobile Close Button */
.dst-jobs-mobile-close {
    display: none;
    position: absolute;
    top: -10px;
    right: -10px;
    background: #CD3A14;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ===================================
   FILTER FORM
   =================================== */
.dst-jobs-filter-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Filter Group */
.dst-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dst-filter-group > label {
    font-size: 14px;
    font-weight: 700;
    color: #FDB227;
    text-transform: uppercase;
    margin:0;
}

/* Input */
.dst-filter-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #FDB227;
    border-radius: 8px;
    background: #1a1c24;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.dst-filter-input:focus {
    outline: none;
    border-color: #CD3A14;
}

.dst-filter-input::placeholder {
    color: #6B7280;
}

/* Select */
.dst-filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #FDB227;
    border-radius: 8px;
    background: #1a1c24;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.dst-filter-select:focus {
    outline: none;
    border-color: #CD3A14;
}

/* Checkboxes */
.dst-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.dst-filter-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.dst-filter-checkboxes::-webkit-scrollbar-track {
    background: #1a1c24;
    border-radius: 3px;
}

.dst-filter-checkboxes::-webkit-scrollbar-thumb {
    background: #FDB227;
    border-radius: 3px;
}

.dst-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
      font-size: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  margin:0;
}

.dst-checkbox-label:hover {
    color: #FDB227;
}

.dst-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FDB227;
}

/* Disabled checkbox state */
.dst-checkbox-label.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.dst-checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

/* Disabled select option */
.dst-filter-select option:disabled {
    opacity: 0.5;
}

/* Buttons */
.dst-filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dst-filter-reset {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #FDB227;
    border: 2px solid #FDB227;
}

.dst-filter-reset:hover {
    background: #FDB227;
    color: #000;
    transform: translateY(-2px);
}

/* Loading state for results during auto-filter */
.dst-jobs-grid {
    transition: opacity 0.3s ease;
}

/* ===================================
   CONTENT AREA (RESULTS)
   =================================== */
.dst-jobs-content {
    min-height: 400px;
}

/* Results Header */
.dst-jobs-results-header {
    margin-bottom: 30px;
}

.dst-jobs-count {
    font-size: 18px;
    color: #0B0D15;
    margin: 0;
}

.dst-jobs-count strong {
    color: #CD3A14;
    font-weight: 700;
}

/* Jobs Grid */
.dst-jobs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    transition: opacity 0.3s ease;
}

/* No Results */
.dst-jobs-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f0d4a5;
    border-radius: 10px;
    border: 3px solid #000;
}

.dst-jobs-no-results p {
    font-size: 18px;
    color: #0B0D15;
    margin: 0;
}

/* Loading Indicator */
.dst-jobs-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.dst-jobs-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0d4a5;
    border-top-color: #FDB227;
    border-radius: 50%;
    animation: dst-spin 1s linear infinite;
}

@keyframes dst-spin {
    to { transform: rotate(360deg); }
}

.dst-jobs-loading p {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
}



/* jobs-list.css | https://dejobs.ddev.site/wp-content/themes/dstdesign-theme/dst-jobs-module/shortcodes/assets/jobs-list.css?ver=1761682374 */

.dst-jobs-list-wrapper {
  /* padding: 40px 20px; */
  padding: 0;
}

.dst-jobs-sidebar {
  /* background: #0B0D15; */
  /* padding: 30px; */
  background: transparent;
  padding: 0;
}

.dst-filter-checkboxes {
  box-shadow: inset 0 0 50px rgba(90, 8, 12, 0.76);
  padding: 20px;
  border-radius: 10px;
}

.dst-filter-group > label {
  line-height: 1;
}

.dst-checkbox-label input[type="checkbox"] {
  /* accent-color: #FDB227; */
  accent-color: #CD3A14;
}

.dst-jobs-count {
  /* color: #0B0D15; */
  color: #F0D4A5;
}


#dst-filter-search {

  border: 2px solid #CD3A14 !important;
  background: transparent !important;
  color: #fff !important;
}

/* Inline | https://dejobs.ddev.site/oferty-pracy/ */

.dst-job-card {
  border-radius: 10px;
  border: 3px solid #000;
  background: #F0D4A5;
  box-shadow: 0 0 0 4px #F0D4A5;
  color: #000;
}

.dst-job-card-title {
  font-size: 26px;
  color: #000;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0B0D15;
  line-height: 1;
}

.dst-job-card {
  padding: 20px;
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #f0d4a5;
  border-radius: 10px;
  border: 3px solid #000;
  box-shadow: 0 0 0 4px #F0D4A5;
}

.dst-job-card-subtitle {
  font-size: 14px;
  color: #000;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  margin-bottom: 1rem;
}

.dst-job-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #0B0D15;
  line-height: 1;
  font-weight: 500;
}

.dst-job-icon {
  flex-shrink: 0;
  color: #CD3A14;
}

.dst-job-card-button {
  display: inline-block;
  width: fit-content;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  border-radius: 8px;
  transition: background 0.3s ease;
  line-height: 1;
  border-radius: 4px;
  background: var(--DEJOBS-Primary, #FDB227);
  box-shadow: 0 0 11px 0 rgba(194, 0, 0, 0.40), 0 0 0 2px #FDB227, 0 0 0 1px #C20000 inset;
  display: flex;
  padding: 12px 20px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: #000;
}

.dst-job-card-footer {
  margin-top: 1rem;
  margin-top: auto;
}

.dst-job-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 2rem;
}

.dst-job-card {
  /* padding: 30px; */
  padding: 25px;
}





/* ===================================
   RESPONSIVE - TABLET
   =================================== */
@media (max-width: 1024px) {
    .dst-jobs-list-wrapper {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }

    .dst-jobs-sidebar {
        padding: 20px;
    }

    .dst-jobs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */
@media (max-width: 767px) {
    .dst-jobs-list-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    /* Show mobile toggle button */
    .dst-jobs-mobile-filter-toggle {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    /* Sidebar as full-screen overlay */
    .dst-jobs-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 99999; /* Wyższy niż header */
        padding: 100px 20px 20px 20px; /* Top padding = wysokość headera + margin */
        border-radius: 0;
        overflow-y: auto;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    
    /* Backdrop behind overlay (optional, for better visual) */
    .dst-jobs-sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(11, 13, 21, 0.95);
        z-index: -1;
    }

    .is-open #dst-jobs-filter-form {
        background: black;
        padding: 1rem;
        border-radius: 10px;
        border: 5px solid var(--DEJOBS-Primary,#FDB227);
        background: #14111A;
        box-shadow: 0 4px 64px 0 #C20000,0 0 0 5px #FDB227;
    }

    .dst-jobs-sidebar.is-open {
        transform: translateY(0);
    }

    /* Show close button */
    .dst-jobs-mobile-close {
        display: flex;
        top: 90px; /* Pod headerem (dostosuj do wysokości headera) */
        right: 15px;
    }

    /* Sidebar title spacing */
    .dst-jobs-sidebar-title {
        margin-top: 0;
    }

    /* Prevent body scroll when filters open */
    body.dst-filters-open {
        overflow: hidden;
    }

    /* Single column grid */
    .dst-jobs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dst-jobs-results-header {
        margin-bottom: 20px;
    }

    .dst-jobs-count {
        font-size: 16px;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .dst-jobs-sidebar {
        padding: 50px 15px 15px 15px;
    }

    .dst-jobs-sidebar-title {
        font-size: 20px;
    }

    .dst-filter-checkboxes {
        max-height: 150px;
    }
}
