/* Teamtailor Jobs Plugin Styles */

.teamtailor-jobs-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 40px 0;
    background: #ffffff;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Section Title */
.teamtailor-jobs-container::before {
    content: "Latest Vacancies";
    display: block;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #231e46;
    margin-bottom: 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Error and No Jobs Messages */
.teamtailor-jobs-error,
.teamtailor-jobs-no-jobs {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
    text-align: center;
}

.teamtailor-jobs-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Jobs List Container */
.teamtailor-jobs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Force single column on tablets and below */
@media (max-width: 1024px) {
    .teamtailor-jobs-list {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }
    
    .teamtailor-job-item {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Individual Job Item */
.teamtailor-job-item {
    background: #f3f1ff;
    border: none;
    border-radius: 12px;
    padding: 24px;
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 180px;
    text-align: center;
}

.teamtailor-job-item:hover {
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.15);
    transform: translateY(-4px);
    background: #F8F9FA;
}

/* Job Header */
.job-header {
    margin-bottom: 16px;
    flex-grow: 1;
}

.job-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #6B46C1;
}

.job-title a {
    color: #231e46;
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-title a:hover {
    color: #553C9A;
    text-decoration: none;
}

/* Job Meta Information */
.job-meta-line {
    display: block;
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #231e46;
    font-weight: 400;
}

.job-location,
.job-locations,
.job-department,
.job-division,
.job-role,
.job-regions,
.job-salary,
.job-currency,
.job-remote {
    display: block;
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #6B7280;
    font-weight: 400;
}

.job-department {
    color: #6B46C1;
    font-weight: 400;
}

.job-division,
.job-role {
    color: #7C3AED;
    font-weight: 600;
}

.job-salary,
.job-currency {
    color: #059669;
    font-weight: 600;
}

.job-remote {
    color: #7C3AED;
    font-weight: 600;
}

.job-regions {
    color: #6B7280;
    font-style: italic;
}

.job-meta-container {
    margin-bottom: 20px;
}

.job-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.job-icon.location {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

.job-icon.department {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 24 24'%3E%3Cpath d='M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z'/%3E%3C/svg%3E");
}

/* Job Description */
.job-description {
    margin-bottom: 16px;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #6B46C1;
}


/* Job Footer */
.job-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding-top: 0;
    border-top: none;
}

.job-apply-btn {
    background: #231e46 !important;
    color: white !important;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.job-apply-btn:hover {
    background: #1a1638 !important;
    color: white !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 30, 70, 0.4);
}

.job-posted {
    font-size: 12px;
    color: #6c757d;
}

/* Grid Template */
.teamtailor-template-grid .teamtailor-jobs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

/* Compact Template */
.teamtailor-template-compact .teamtailor-job-item {
    padding: 16px;
    margin-bottom: 12px;
}

.teamtailor-template-compact .job-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.teamtailor-template-compact .job-description {
    display: none;
}

.teamtailor-template-compact .job-requirements,
.teamtailor-template-compact .job-benefits {
    display: none;
}

.teamtailor-template-compact .job-footer {
    margin-top: 12px;
    padding-top: 12px;
}

/* List Template (default) - no additional styles needed */

/* Jobs Footer */
.teamtailor-jobs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.jobs-count {
    font-size: 14px;
    color: #6c757d;
}

/* Loading State */
.teamtailor-jobs-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.teamtailor-jobs-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .teamtailor-jobs-container {
        padding: 20px 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .teamtailor-jobs-container::before {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .teamtailor-jobs-list {
        grid-template-columns: 1fr !important;
        gap: 16px;
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .teamtailor-job-item {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    
    .teamtailor-job-item {
        padding: 20px;
        min-height: 160px;
    }
    
    .job-title {
        font-size: 18px;
    }
    
    .job-location,
    .job-department {
        font-size: 13px;
    }
    
    .job-apply-btn {
        padding: 10px 24px;
        font-size: 13px;
    }
    
    .teamtailor-jobs-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .teamtailor-jobs-container {
        padding: 15px 10px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .teamtailor-jobs-list {
        grid-template-columns: 1fr !important;
        gap: 16px;
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .teamtailor-job-item {
        padding: 12px;
        min-height: auto;
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .job-title {
        font-size: 18px;
    }
    
    .job-apply-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .teamtailor-jobs-container {
        color: #333;
    }
    
    .teamtailor-job-item {
        background: #f3f1ff !important;
        border-color: transparent;
        color: #333;
    }
    
    .job-title a {
        color: #231e46 !important;
    }
    
    .job-title a:hover {
        color: #553C9A !important;
    }
    
    .job-location,
    .job-department,
    .job-posted,
    .jobs-count {
        color: #6B7280 !important;
    }
    
    .job-meta-line {
        color: #231e46 !important;
    }
    
    .job-description,
    .job-requirements,
    .job-benefits {
        color: #555 !important;
    }
    
    .job-requirements h4,
    .job-benefits h4 {
        color: #6B46C1 !important;
    }
    
    .job-footer {
        border-top-color: transparent;
    }
    
    .teamtailor-jobs-footer {
        border-top-color: #e9ecef;
    }
}

/* Custom Theme Integration */
.teamtailor-jobs-container.theme-integration {
    /* This class can be used to integrate with your theme's styles */
}

/* Print Styles */
@media print {
    .teamtailor-jobs-footer,
    .job-apply-btn {
        display: none;
    }
    
    .teamtailor-job-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
