/* ===================================================================
   Sumilabec WP Job Post Manager - CONSOLIDATED STYLESHEET
   =================================================================== */

/* --- 1. Job Archive Page: Filter & Listings --- */

/* Modern & Responsive Job Filter */
.sumilabec-job-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background-color: #f7f9fc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e8eef6;
    margin-bottom: 30px;
}

.sumilabec-job-filters input[type="text"],
.sumilabec-job-filters select {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.sumilabec-job-filters select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 1em;
}

.sumilabec-job-filters input[type="text"]:focus,
.sumilabec-job-filters select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.sumilabec-job-filters button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff !important;
    /* Make sure the # is included! */
    background-color: #2ea2cc;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.sumilabec-job-filters button:hover {
    /* Make sure the # is included! */
    background-color: #303954;
    transform: translateY(-2px);
}

/* Horizontal Job Card Layout */
.job-card-horizontal {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0f0ff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    gap: 20px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.job-card-horizontal:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.job-card-logo { flex-shrink: 0; }
.job-card-logo img, .job-card-logo .logo-placeholder { 
    width: 50px; 
    height: 50px; 
    border-radius: 5px;
    display: block;
}
.job-card-logo .logo-placeholder { background-color: #f0f0f0; }

.job-card-main { flex-grow: 1; }
.job-card-title { margin: 0 0 5px 0; font-size: 1.2em; line-height: 1.4; }
.job-card-title a { color: #333; text-decoration: none; font-weight: 700; }
.job-card-title a:hover { color: #0073aa; }

.job-card-company a { color: #0073aa; text-decoration: none; font-size: 0.9em; }
.job-card-details { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 8px; font-size: 0.9em; color: #555; }

.job-card-tags { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.job-tag {
    background-color: #eaf7ff;
    color: #0073aa;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}
.job-card-apply { flex-shrink: 0; }
.apply-button {
    background-color: #ff4d4d;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}
.apply-button:hover { background-color: #d93636; }

/* --- 2. Single Job Post Page Styles --- */

/* Job Details Box */
.job-details-box {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #0073aa;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 25px;
}

.job-details-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.job-details-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.job-details-box li {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: calc(50% - 10px);
    padding: 12px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
}

.job-details-box li strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.job-details-box li small {
    display: block;
    color: #555;
    font-size: 0.9em;
    margin-top: 8px;
    word-break: break-word;
}

/* Currency Symbol Styling */
.job-detail-salary .salary-amount::before {
    content: var(--currency-symbol);
    margin-right: 3px;
    font-weight: normal;
}

/* Apply Button */
.sumilabec-apply-wrapper {
    text-align: center;
    margin-top: 25px;
}

.sumilabec-apply-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #2ea2cc;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sumilabec-apply-button:hover {
    background-color: #358dad;
    color: #fff;
}

/* --- 3. Theme-Specific Overrides --- */

/* Hide redundant post title and meta on single job pages */
body.single-sumilabec_job .entry-title,
body.single-sumilabec_job .entry-meta {
  display: none !important;
}

/* Adjust padding for specific themes */
body.single-sumilabec_job .entry-content-detail {
  padding-top: 15px !important;
}
body.single-sumilabec_job #main-container {
  padding-top: 0 !important;
}


/* --- 4. Responsive Media Queries --- */

@media (max-width: 992px) {
    .job-card-tags { 
        display: none; /* Hide tags on smaller tablets to save space */
    }
}

@media (max-width: 768px) {
    /* Stack job cards on mobile */
    .job-card-horizontal {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .job-card-main { width: 100%; }
    .job-card-tags { 
        order: 3; 
        flex-direction: row; 
        margin-top: 15px; 
        display: flex; /* Re-display tags on mobile */
    }
    .job-card-apply { 
        order: 4; 
        width: 100%; 
        margin-top: 15px; 
    }
    .apply-button { 
        display: block; 
        text-align: center; 
    }

    /* Stack job details list items on mobile */
    .job-details-box li {
        flex-basis: 100%;
    }

    /* General text overflow fix for mobile */
    body.single-sumilabec_job #main-content * {
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }
}





/* ===================================================================
   --- 5. NEW STYLES ADDED FOR MODERN JOB CARD LAYOUT ---
   These styles will override the default card layout above to match the screenshot.
   =================================================================== */

/* New Job Card Overrides */
.job-card-horizontal {
    padding: 24px;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.job-card-logo img, .job-card-logo .logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    object-fit: contain;
    padding: 5px;
    background-color: #fff;
}

.job-card-title a {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.job-card-title a:hover {
    color:  #2ea2cc;
}

.job-card-company a {
    color: #555;
    font-weight: 500;
}

.job-card-details {
    gap: 16px;
    font-size: 14px;
    color: #666;
    margin-top: 12px;
}

.job-card-details span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* We create a new container for tags and button for better alignment */
.job-card-tags, .job-card-apply {
    flex-shrink: 1; /* Allow shrinking */
}

/* New element for better alignment on desktop */
.job-card-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto; /* Pushes this section to the right */
}

.job-tag {
    background-color: #e7f3ff;
    color: #2ea2cc;
    padding: 5px 12px;
    font-size: 12px;
}

.apply-button {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
}

/* --- Pagination Styling (Completely New) --- */
.sumilabec-pagination {
    margin-top: 40px;
    text-align: center;
}

.sumilabec-pagination .page-numbers {
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #2ea2cc;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sumilabec-pagination .page-numbers:hover,
.sumilabec-pagination .page-numbers.current {
    background-color: #2ea2cc;
    color: #fff;
    border-color: #2ea2cc;
}

/* --- New Responsive Overrides --- */
@media (max-width: 768px) {
    /* These rules will override the ones in Section 4 for the job cards */
    .job-card-horizontal {
        padding: 20px;
    }

    .job-card-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-left: 0;
        margin-top: 15px; /* Creates space between main content and buttons */
    }

    /* We remove the job-card-apply margin-top since job-card-actions now handles it */
    .job-card-apply {
        margin-top: 0;
    }

    .apply-button {
        width: 100%; /* Makes the button full-width on mobile */
    }
}







/* --- 6. Company Archive Page Styles (NEW) --- */

.company-archive-header {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 30px;
    margin-bottom: 40px;
    background-color: #f7f9fc;
    border-radius: 12px;
    border: 1px solid #e8eef6;
}

.company-header-logo img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    padding: 5px;
}

.company-header-info {
    flex-grow: 1;
}

.company-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.company-description {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
}

.company-website-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2ea2cc;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.company-website-link:hover {
    background-color: #303954;
}

.company-jobs-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8eef6;
}





/*
 * Styling for the "View More Jobs" Button
 * -------------------------------------------
 */

.sumilabec-load-more-btn {
    /* --- Feel free to change this background color to match your brand! --- */
    background-color: #2ea2cc;
    color: #ffffff;
    border: none;
    border-radius: 8px; /* Makes the corners rounded */
    padding: 12px 28px; /* Gives the text more space */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    /* Effects for a smooth hover transition */
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style for when you hover your mouse over the button */
.sumilabec-load-more-btn:hover {
    background-color: #303954; /* A slightly darker blue on hover */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px); /* Makes the button lift up slightly */
}

/* Style for when the button is loading and disabled */
.sumilabec-load-more-btn:disabled {
    background-color: #cccccc; /* Gray color to show it's inactive */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}