/**
 * CareerNest — Jobs By Category (tabbed) shortcode styles
 *
 * Emitted by `[careernest_jobs_by_category]`. Brand colors use CSS
 * custom properties (set in :root by class-plugin.php → output_custom_css)
 * with the default brand orange as a fallback.
 *
 * Note: job-type pill colors (full-time green, contract blue, casual
 * black, part-time orange) are intentionally hardcoded — they're
 * categorical/semantic, not brand-driven.
 */

.cn-jobs-by-category-wrapper {
    margin: 0;
    padding: 0;
    background: transparent;
}

.cn-jobs-tabs-title {
    margin: 0 0 2rem 0;
    font-size: 1.75rem;
    color: #2c3e50;
    text-align: center;
}

/* Tabs Navigation */
.cn-tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 2px solid #e4e4e4;
    padding-bottom: 0;
}

.cn-tab-btn {
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
}

.cn-tab-btn:hover {
    color: var(--cn-primary-btn, #FF8200);
}

.cn-tab-btn.active {
    color: var(--cn-primary-btn, #FF8200);
    border-bottom-color: var(--cn-primary-btn, #FF8200);
}

.cn-tab-count {
    font-size: 13px;
    font-weight: 400;
    color: #999999;
    margin-left: 0.25rem;
}

.cn-tab-btn.active .cn-tab-count {
    color: var(--cn-primary-btn, #FF8200);
}

/* Tab Content */
.cn-tabs-content {
    position: relative;
}

.cn-tab-pane {
    display: none;
}

.cn-tab-pane.active {
    display: block;
    animation: cn-fadeIn 0.3s ease;
}

@keyframes cn-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* View More Button */
.cn-view-more-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.cn-btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--cn-primary-btn, #FF8200);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cn-btn-view-more:hover {
    background: var(--cn-primary-btn-hover, #e37600);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--cn-primary-btn-rgb, 255, 130, 0), 0.3);
}

/* Empty state */
.cn-tab-empty {
    padding: 3rem;
    text-align: center;
    color: #718096;
    background: #f7fafc;
    border-radius: 8px;
}

.cn-jobs-tabs-empty {
    padding: 2rem;
    text-align: center;
    color: #718096;
    background: #f7fafc;
    border-radius: 8px;
}

/* Job Card Styles */
.cn-job-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.cn-job-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.cn-job-card.cn-job-filled {
    opacity: 0.7;
    background: #f7fafc;
}

.cn-job-card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
    position: relative;
}

.cn-job-logo,
.cn-job-logo-placeholder {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    object-fit: contain;
}

.cn-job-logo-placeholder {
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: #4a5568;
}

.cn-job-header-content {
    flex: 1;
    min-width: 0;
}

.cn-job-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.cn-job-title a {
    color: #1a202c;
    text-decoration: none;
}

.cn-job-title a:hover {
    color: var(--cn-primary-btn, #FF8200);
    text-decoration: underline;
}

.cn-job-company {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

.cn-company-separator {
    color: #cbd5e0;
}

.cn-job-type-inline {
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
}

/* Categorical job-type colors (semantic — not brand) */
.cn-job-type-inline.cn-job-type-part-time {
    color: #FF8200;
}

.cn-job-type-inline.cn-job-type-contract {
    color: #0275F4;
}

.cn-job-type-inline.cn-job-type-full-time {
    color: #17B86A;
}

.cn-job-type-inline.cn-job-type-casual {
    color: #101010;
}

.cn-job-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cn-status-filled {
    background: #fed7d7;
    color: #c53030;
}

.cn-job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cn-job-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #4a5568;
    font-size: 0.875rem;
}

.cn-job-meta-item svg {
    flex-shrink: 0;
}

.cn-job-meta-item.cn-salary {
    font-weight: 600;
    color: #2d3748;
}

.cn-remote-badge {
    display: inline-block;
    background: #c6f6d5;
    color: #22543d;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.cn-job-excerpt {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cn-job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.cn-job-expiry {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.cn-expiry-normal {
    color: #718096;
}

.cn-expiry-warning {
    color: #d69e2e;
}

.cn-expiry-urgent {
    color: #dd6b20;
}

.cn-job-closing-date {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #D83636;
}

/* Responsive */
@media (max-width: 1024px) {
    .cn-jobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cn-tabs-nav {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .cn-tab-btn {
        white-space: nowrap;
        padding: 0.75rem 1.25rem;
        font-size: 14px;
    }

    .cn-jobs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cn-job-card {
        padding: 1rem;
    }
}
