/**
 * SmartRecruiters Job Listings - Theme-Agnostic Styles
 * 
 * This CSS file contains only structural styles and inherits
 * colors, fonts, and other design elements from the WordPress theme.
 */

/* Container and Layout */
.smartrecruiters-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1em;
}

/* Header */
.smartrecruiters-header {
    text-align: center;
    margin-bottom: 2em;
}

.smartrecruiters-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0.5em;
    /* Inherits color from theme */
}

.smartrecruiters-subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    /* Inherits color from theme */
}

/* Search Section */
.smartrecruiters-search-section {
    margin-bottom: 2em;
}

.smartrecruiters-search-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.smartrecruiters-search-box {
    position: relative;
    flex: 1;
}

.smartrecruiters-search-box input {
    width: 100%;
    padding: 0.75em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    /* Inherits background and color from theme */
}

.smartrecruiters-search-box input:focus {
    outline: none;
    border-color: currentColor;
    /* Uses theme's current text color for focus */
}

/* Filters */
.smartrecruiters-filters {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    align-items: center;
}

.smartrecruiters-filters select {
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
    min-width: 150px;
    /* Inherits background and color from theme */
}

.smartrecruiters-filters select:focus {
    outline: none;
    border-color: currentColor;
}

.smartrecruiters-search-btn {
    padding: 0.5em 1em;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Inherits colors from theme */
    background: transparent;
    color: inherit;
}

.smartrecruiters-search-btn:hover {
    background: currentColor;
    color: var(--background-color, #fff);
}

/* Loading and Error States */
.smartrecruiters-loading,
.smartrecruiters-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3em 1em;
    text-align: center;
}

.smartrecruiters-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid currentColor;
    border-radius: 50%;
    animation: smartrecruiters-spin 1s linear infinite;
    margin-bottom: 1em;
}

@keyframes smartrecruiters-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.smartrecruiters-retry-btn {
    padding: 0.5em 1em;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1em;
    /* Inherits colors from theme */
    background: transparent;
    color: inherit;
}

.smartrecruiters-retry-btn:hover {
    background: currentColor;
    color: var(--background-color, #fff);
}

/* Results Info */
.smartrecruiters-results-info {
    padding: 0.75em 1.25em;
    margin-bottom: 1em;
    border-left: 4px solid currentColor;
    /* Inherits background and color from theme */
}

.smartrecruiters-results-info p {
    margin: 0;
    font-weight: 500;
    /* Inherits color from theme */
}

/* Job Listings */
.smartrecruiters-job-listings {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2em;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Inherits background from theme */
    background: var(--background-color, #fff);
}

.smartrecruiters-job-card {
    padding: 1.25em;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
    /* Inherits background and color from theme */
    background: transparent;
    color: inherit;
}

.smartrecruiters-job-card:last-child {
    border-bottom: none;
}

.smartrecruiters-job-card:hover {
    background: var(--hover-background, rgba(0,0,0,0.05));
}

/* Job Card Content */
.smartrecruiters-job-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.smartrecruiters-job-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 0.25em 0;
    line-height: 1.3;
    /* Inherits color from theme */
}

.smartrecruiters-job-details {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    flex: 1;
    margin: 0 1.25em;
}

.smartrecruiters-job-detail {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.95em;
    /* Inherits color from theme */
}

.smartrecruiters-job-detail i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.smartrecruiters-job-footer {
    display: flex;
    align-items: center;
    gap: 1em;
}

.smartrecruiters-employment-type {
    font-size: 0.95em;
    font-weight: 500;
    /* Inherits color from theme */
}

.smartrecruiters-job-actions {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.smartrecruiters-job-actions i {
    font-size: 0.9em;
    opacity: 0.7;
}

/* Show More Button */
.smartrecruiters-show-more-btn {
    padding: 0.75em 2em;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 2em auto;
    text-align: center;
    /* Inherits colors from theme */
    background: transparent;
    color: inherit;
}

.smartrecruiters-show-more-btn:hover {
    background: currentColor;
    color: var(--background-color, #fff);
}

/* No Jobs State */
.smartrecruiters-no-jobs {
    text-align: center;
    padding: 3em 1em;
    /* Inherits color from theme */
}

.smartrecruiters-no-jobs i {
    font-size: 3em;
    opacity: 0.3;
    margin-bottom: 1em;
}

.smartrecruiters-no-jobs h3 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    /* Inherits color from theme */
}

/* Responsive Design */
@media (max-width: 768px) {
    .smartrecruiters-container {
        padding: 0.75em;
    }
    
    .smartrecruiters-title {
        font-size: 1.75em;
    }
    
    .smartrecruiters-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .smartrecruiters-filters select {
        min-width: auto;
    }
    
    .smartrecruiters-job-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1em;
    }
    
    .smartrecruiters-job-details {
        margin: 0;
    }
    
    .smartrecruiters-job-footer {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .smartrecruiters-title {
        font-size: 1.5em;
    }
    
    .smartrecruiters-subtitle {
        font-size: 1em;
    }
    
    .smartrecruiters-job-card {
        padding: 1em;
    }
}

/* Accessibility */
.smartrecruiters-job-card:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.smartrecruiters-search-btn:focus,
.smartrecruiters-retry-btn:focus,
.smartrecruiters-show-more-btn:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .smartrecruiters-job-card {
        border: 2px solid currentColor;
    }
    
    .smartrecruiters-job-card:hover {
        background: currentColor;
        color: var(--background-color, #fff);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .smartrecruiters-spinner {
        animation: none;
    }
    
    .smartrecruiters-job-card,
    .smartrecruiters-search-btn,
    .smartrecruiters-retry-btn,
    .smartrecruiters-show-more-btn {
        transition: none;
    }
}
