/* CoreSignal Jobs Demo Styles */
:root {
    --demo-primary: #132361; /* Reunion Blue */
    --demo-primary-hover: #0f1d4d;
    --demo-secondary: #0072B0; /* Dallas Charm */
    --demo-accent: #71C7F0; /* Fountain */
    --demo-text: #15181C; /* Concrete Dark */
    --demo-text-light: #6E767F; /* Concrete Medium */
    --demo-border: #DEE5EE; /* Concrete Lighter */
    --demo-background: #E8F1FA; /* Concrete Lightest */
    --demo-white: #ffffff;
    --demo-success: #157443; /* Jobs */
    --demo-warning: #E27725; /* Living Medium */
    --demo-error: #A41D45; /* Culture */
}

.coresignal-jobs-demo {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

/* Demo Badge */
.demo-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, var(--demo-accent), var(--demo-primary));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    z-index: 100;
}

.demo-label {
    margin-right: 8px;
}

.demo-powered {
    opacity: 0.8;
    font-size: 10px;
}

/* Header */
.demo-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 30px;
}

.demo-title {
    font-size: clamp(28px, 5vw, 48px);
    color: var(--demo-primary);
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.2;
}

.demo-subtitle {
    color: var(--demo-text-light);
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

/* Quick Filters */
.quick-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.quick-filter-btn {
    background: var(--demo-white);
    border: 2px solid var(--demo-border);
    color: var(--demo-text);
    padding: 8px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.quick-filter-btn:hover,
.quick-filter-btn.active {
    background: var(--demo-primary);
    color: white;
    border-color: var(--demo-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 35, 97, 0.3);
}

/* Filters */
.demo-filters {
    background: var(--demo-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    color: var(--demo-text);
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    padding: 12px 16px;
    border: 1px solid var(--demo-border);
    border-radius: 999px;
    font-size: 16px;
    background: var(--demo-white);
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--demo-secondary);
    box-shadow: 0 0 0 3px rgba(0, 114, 176, 0.1);
}

.search-btn {
    background: var(--demo-primary);
    color: white;
    border: 2px solid var(--demo-primary);
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.search-btn:hover {
    background: var(--demo-primary-hover);
    border-color: var(--demo-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(19, 35, 97, 0.3);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Stats */
.demo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: var(--demo-white);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--demo-primary);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.stat-number.updated {
    transform: scale(1.1);
    color: var(--demo-secondary);
}

.stat-label {
    font-size: 14px;
    color: var(--demo-text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--demo-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--demo-border);
    border-top: 4px solid var(--demo-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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

.loading-state p {
    color: var(--demo-text-light);
    font-size: 16px;
    margin: 0;
}

/* Jobs List */
.jobs-results {
    margin-bottom: 40px;
}

.jobs-list {
    display: grid;
    gap: 20px;
}

.job-card {
    background: var(--demo-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--demo-secondary);
}

.job-header {
    margin-bottom: 16px;
}

.job-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--demo-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--demo-text-light);
}

.job-meta span {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.company {
    color: var(--demo-primary) !important;
    font-weight: 600 !important;
}

.job-content {
    margin-bottom: 20px;
}

.job-description {
    color: var(--demo-text);
    line-height: 1.6;
    margin-bottom: 16px;
}

.job-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--demo-text-light);
}

.job-details span {
    background: var(--demo-background);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.salary {
    background: var(--demo-success) !important;
    color: white !important;
}

.job-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.apply-btn {
    background: var(--demo-primary);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    border: 2px solid var(--demo-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.apply-btn:hover {
    background: var(--demo-primary-hover);
    border-color: var(--demo-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(19, 35, 97, 0.3);
    text-decoration: none;
    color: white;
}

/* Error States */
.error-message {
    background: #fef2f2;
    border: 2px solid var(--demo-error);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.error-message h3 {
    color: var(--demo-error);
    margin: 0 0 16px 0;
}

.error-message ul {
    text-align: left;
    max-width: 400px;
    margin: 16px auto;
}

.retry-btn {
    background: var(--demo-error);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 16px;
}

.no-jobs {
    text-align: center;
    padding: 60px 20px;
    background: var(--demo-background);
    border-radius: 12px;
    color: var(--demo-text-light);
    font-size: 18px;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination-info {
    margin-bottom: 20px;
    color: var(--demo-text-light);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-btn {
    background: var(--demo-white);
    border: 2px solid var(--demo-border);
    color: var(--demo-text);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover {
    background: var(--demo-primary);
    color: white;
    border-color: var(--demo-primary);
}

/* Demo Footer */
.demo-footer {
    background: var(--demo-background);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-top: 40px;
}

.demo-footer p {
    margin: 8px 0;
    line-height: 1.6;
}

.demo-footer strong {
    color: var(--demo-primary);
}

/* Demo Tour */
.demo-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.demo-tour-popup {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.demo-tour-popup h3 {
    color: var(--demo-primary);
    margin: 0 0 20px 0;
    font-size: 24px;
}

.demo-tour-popup ul {
    text-align: left;
    margin: 20px 0;
}

.tour-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

.tour-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tour-btn.skip {
    background: var(--demo-background);
    border: 2px solid var(--demo-border);
    color: var(--demo-text);
}

.tour-btn.start {
    background: var(--demo-primary);
    border: 2px solid var(--demo-primary);
    color: white;
}

.tour-btn:hover {
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .coresignal-jobs-demo {
        padding: 15px;
    }
    
    .demo-title {
        font-size: 24px;
    }
    
    .quick-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .filter-form.mobile-layout .filter-group {
        width: 100%;
    }
    
    .demo-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .job-card {
        padding: 20px;
    }
    
    .job-title {
        font-size: 18px;
    }
    
    .job-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .job-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .apply-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .demo-tour-popup {
        margin: 10px;
        padding: 30px;
    }
    
    .tour-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .demo-stats {
        grid-template-columns: 1fr;
    }
    
    .job-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .pagination-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    .demo-badge,
    .quick-filters,
    .demo-filters,
    .loading-state,
    .job-actions,
    .pagination,
    .demo-tour-overlay {
        display: none;
    }
    
    .job-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 20px;
    }
}