/* Jobs Plugin - Modern & Beautiful Frontend Styles */

/* Custom CSS Variables for consistent theming */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --dark-text: #1e293b;
    --light-text: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Styles */
.jobs-container,
.jobs-archive-container,
.job-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
}

/* Beautiful Filter Section */
.jobs-filter {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-bg) 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.jobs-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark), var(--success-color));
}

.jobs-filter form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--dark-text);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.filter-group input::placeholder {
    color: var(--light-text);
}

/* Jobs Count with gradient background */
.jobs-count {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: var(--light-bg);
    border: 1px solid var(--border-color);
}

/* Beautiful Jobs Grid - 3 columns */
.jobs-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .jobs-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .jobs-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Enhanced Job Cards - Simpler & Stylish */
.job-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 16px 16px 0 0;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.job-card:hover::before {
    transform: scaleX(1);
}

.job-header {
    margin-bottom: 1rem;
}

.job-header h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark-text);
}

.job-header h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.job-header h3 a:hover {
    color: var(--primary-color);
}

.job-company {
    color: var(--light-text);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-company::before {
    content: '🏢';
    font-size: 0.875rem;
}

/* Beautiful Meta Information - Simplified */
.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.job-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--light-bg);
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--dark-text);
    transition: all 0.2s ease;
}

.job-meta .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.job-city {
    background: #e0f2fe !important;
    color: #0277bd !important;
}

.job-city .dashicons {
    color: #0277bd !important;
}

.job-salary {
    background: #e8f5e8 !important;
    color: #2e7d32 !important;
}

.job-salary .dashicons {
    color: #2e7d32 !important;
}

.job-type {
    background: #fff3e0 !important;
    color: #f57c00 !important;
}

.job-type .dashicons {
    color: #f57c00 !important;
}

/* Categories with beautiful tags */
.job-categories {
    margin-bottom: 1.5rem;
}

.job-category-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.job-category-tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.job-excerpt {
    color: var(--light-text);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Beautiful Action Buttons - Simplified */
.job-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
}

/* Enhanced Button Styles - Simplified */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

/* Load More Button with special styling */
.jobs-load-more-container {
    text-align: center;
    margin-top: 3rem;
}

#load-more-jobs {
    padding: 1rem 2rem;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

#load-more-jobs::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

#load-more-jobs:hover::before {
    width: 300px;
    height: 300px;
}

#load-more-jobs:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

#load-more-jobs:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
}

/* Archive Header with gradient */
.jobs-archive-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--white) 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.jobs-archive-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.jobs-archive-header p {
    font-size: 1.25rem;
    color: var(--light-text);
    font-weight: 500;
}

/* Single Job Page Enhancements */
.job-single-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--white) 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.job-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.job-single-meta {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.job-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.job-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.job-meta-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.job-meta-label {
    font-weight: 700;
    color: var(--dark-text);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.job-meta-value {
    color: var(--primary-color);
    font-weight: 600;
}

.job-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

.job-categories-label {
    font-weight: 700;
    color: var(--dark-text);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.job-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-single-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    line-height: 1.8;
    font-size: 1rem;
}

.job-single-content h1,
.job-single-content h2,
.job-single-content h3 {
    color: var(--dark-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.job-single-content ul,
.job-single-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.job-single-content li {
    margin-bottom: 0.5rem;
}

.job-single-actions {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* Enhanced Modal Styles */
.job-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(4px);
}

.job-modal-content {
    background: var(--white);
    margin: 3% auto;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    position: relative;
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.job-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--light-text);
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.job-modal-close:hover {
    color: var(--danger-color);
    background: var(--light-bg);
}

.job-modal h3 {
    margin-bottom: 2rem;
    color: var(--dark-text);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.job-modal form {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.form-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--dark-text);
}

/* Checkbox specific styling */
.form-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.privacy-policy-panel {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--light-text);
    font-style: italic;
}

/* Privacy policy modal styling */
.privacy-policy-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.875rem;
    color: var(--dark-text);
}

.privacy-policy-content p {
    margin-bottom: 1rem;
}

.privacy-policy-content h1,
.privacy-policy-content h2,
.privacy-policy-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

#privacy-policy-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

#privacy-policy-link:hover {
    color: var(--primary-dark);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-shrink: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--white);
    position: sticky;
    bottom: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 0.5rem;
}

/* Success/Error Messages */
.message {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid;
}

.message.success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Clear Filters Button */
#clear-filters {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

#clear-filters:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .jobs-container,
    .jobs-archive-container,
    .job-single-container {
        padding: 1rem;
    }
    
    .jobs-filter {
        padding: 1.5rem;
    }
    
    .jobs-filter form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .jobs-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .job-card {
        padding: 1.5rem;
    }
    
    .job-actions {
        flex-direction: column;
    }
    
    .job-meta-grid {
        grid-template-columns: 1fr;
    }
    
    .job-single-actions {
        padding: 1rem;
    }
    
    .job-modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
        max-height: 90vh;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .jobs-archive-header {
        padding: 2rem 1rem;
    }
    
    .jobs-archive-header h1 {
        font-size: 2rem;
    }
    
    .job-title {
        font-size: 2rem;
    }
    
    .job-single-header,
    .job-single-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .job-card {
        padding: 1rem;
    }
    
    .job-single-content {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        min-width: 120px;
    }
    
    .job-meta {
        gap: 0.5rem;
    }
    
    .job-meta span {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    .jobs-archive-header h1 {
        font-size: 1.75rem;
    }
    
    .job-title {
        font-size: 1.75rem;
    }
    
    .job-modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 1rem;
        max-height: 95vh;
    }
    
    .job-modal h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-actions {
        margin-top: 1rem;
        padding-top: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .jobs-filter,
    .job-actions,
    .jobs-load-more-container {
        display: none;
    }
    
    .job-card,
    .job-single-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}