/* Synevo Job Offers - frontend.css */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Sora:wght@600;700&display=swap');

/* =========================================================
   Wrapper
   ========================================================= */
.synevo-job-offers-wrapper {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    color: #333;
}

/* =========================================================
   Controls row (search + filters, side by side on desktop)
   ========================================================= */
.sjo-controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* =========================================================
   Search Box
   ========================================================= */
.sjo-search-box {
    flex: 1 1 auto;
    min-width: 200px;
    max-width: 480px;
}

.sjo-search-input {
    width: 100%;
    margin: 0 !important;
    max-width: none !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 12px 16px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    background-color: #fff !important;
    border: 1px solid rgba(0,41,85,.1019607843) !important;
    border-radius: 48px !important;
    box-shadow: none !important;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sjo-search-input:focus {
    outline: none;
    border-color: #0066a1;
    box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.12);
}

/* =========================================================
   Filters
   ========================================================= */
.sjo-filters {
    display: flex;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    gap: 12px;
}

.sjo-filters select {
    flex: 0 0 auto;
    width: auto;
    min-width: 180px;
    box-sizing: border-box;
    overflow: hidden;
    height: 44px;
    padding: 10px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid rgba(0,41,85,.1019607843) !important;
    border-radius: 48px !important;
    transition: border-color var(--transition-speed) var(--transition-timing-function), box-shadow var(--transition-speed) var(--transition-timing-function);
}

.sjo-filters select:focus {
    outline: none;
    border-color: #0066a1;
    box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.12);
}

/* =========================================================
   Table Container
   ========================================================= */
.sjo-table-container {
    overflow-x: auto;
    margin-top: 24px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* =========================================================
   Table
   ========================================================= */
.synevo-job-offers-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

/* --- Head --- */
.synevo-job-offers-table thead {
    background: #fff;
    border-bottom: 2px solid #000;
}

.synevo-job-offers-table th {
    padding: 18px 24px !important;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #000;
    white-space: nowrap;
    border: none;
    user-select: none;
}

.synevo-job-offers-table th.sjo-col-details {
    width: 160px;
    text-align: center;
}

/* --- Body rows --- */
.synevo-job-offers-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.15s;
}

.synevo-job-offers-table tbody tr:last-child {
    border-bottom: none;
}

.synevo-job-offers-table tbody tr:hover {
    background-color: #f0f7fc;
}

.synevo-job-offers-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.synevo-job-offers-table tbody tr:nth-child(even):hover {
    background-color: #f0f7fc;
}

/* --- Cells --- */
.synevo-job-offers-table td {
    padding: 18px 24px !important;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

.synevo-job-offers-table td.sjo-col-title {
    line-height: 1.4;
}

.synevo-job-offers-table td.sjo-col-details {
    text-align: center;
    white-space: nowrap;
}

/* Przycisk Szczegóły — dopasowany do globalnego stylu przycisków na stronie */
.sjo-details-btn {
    position: relative;
    z-index: 2;
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    font-weight: 400;
    font-family: var(--wp--preset--font-family--base-font);
    color: var(--wp--preset--color--light) !important;
    text-decoration: none !important;
    border-radius: 6.25rem !important;
    background: var(--wp--preset--color--primary) !important;
    white-space: nowrap;
    transition: filter 0.2s, transform 0.1s;
}

.sjo-details-btn:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

/* =========================================================
   Loading Spinner
   ========================================================= */
.sjo-loading {
    text-align: center;
    padding: 50px 20px;
}

.sjo-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e8e8e8;
    border-top: 4px solid #0066a1;
    border-radius: 50%;
    animation: sjo-spin 0.8s linear infinite;
}

@keyframes sjo-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================================
   No Results
   ========================================================= */
.sjo-no-results {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
    .synevo-job-offers-table th,
    .synevo-job-offers-table td {
        padding: 14px 16px;
        font-size: 13px;
    }

    .sjo-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sjo-search-box {
        max-width: 100%;
    }

    .sjo-search-input {
        font-size: 16px; /* zapobiega zoomowi na iOS */
    }

    .sjo-filters {
        flex-direction: column;
    }

    .sjo-filters select {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .synevo-job-offers-table th.sjo-col-region,
    .synevo-job-offers-table td.sjo-col-region {
        display: none;
    }

    .sjo-details-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}