/**
 * ATS Opportunity Integration Styles
 * 
 * Blends ATS components seamlessly with existing opportunity UI
 */

/* ========================================
   ATS Section in Archive
   ======================================== */
.hi-ats-opportunity-section {
    margin: 60px 0;
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(155, 89, 182, 0.03) 100%);
    border-radius: 16px;
}

.hi-ats-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 30px;
}

.hi-ats-section-header > div:first-child {
    flex: 1;
}

.hi-ats-section-header h2 {
    margin: 10px 0 15px;
    font-size: 32px;
    font-weight: 700;
    color: var(--hi-text-primary, #1a1a1a);
}

.hi-ats-section-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--hi-text-secondary, #666);
    max-width: 600px;
}

.hi-ats-section-cta {
    flex-shrink: 0;
}

.hi-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hi-button--ghost {
    background: transparent;
    border: 2px solid var(--hi-primary, #3498db);
    color: var(--hi-primary, #3498db);
}

.hi-button--ghost:hover {
    background: var(--hi-primary, #3498db);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.hi-ats-opportunity-grid {
    margin-top: 30px;
}

/* Blend ATS job cards with opportunity cards */
.hi-ats-opportunity-grid .ats-job-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.hi-ats-opportunity-grid .ats-job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--hi-primary, #3498db);
}

.hi-ats-opportunity-grid .ats-job-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--hi-text-primary, #1a1a1a);
}

.hi-ats-opportunity-grid .ats-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--hi-text-secondary, #666);
}

.hi-ats-opportunity-grid .ats-btn {
    margin-top: 16px;
}

/* ========================================
   ATS Apply Section in Single Opportunity
   ======================================== */
.hi-ats-apply-section {
    background: var(--hi-section-bg);
    padding: 80px 0;
    margin-top: 60px;
}

:root {
    --hi-section-bg: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --hi-apply-content-bg: #ffffff;
    --hi-apply-content-border: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --hi-section-bg: transparent;
    --hi-apply-content-bg: rgba(26, 32, 44, 0.6);
    --hi-apply-content-border: rgba(45, 55, 72, 0.8);
}

.hi-ats-apply-container {
    max-width: 800px;
    margin: 0 auto;
}

.hi-ats-apply-header {
    text-align: center;
    margin-bottom: 50px;
}

.hi-ats-apply-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 15px 0 20px;
    color: var(--hi-text-primary, #1a1a1a);
}

.hi-ats-apply-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: var(--hi-text-secondary, #666);
    max-width: 600px;
    margin: 0 auto;
}

.hi-ats-apply-content {
    background: var(--hi-apply-content-bg);
    border: 1px solid var(--hi-apply-content-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .hi-ats-apply-content {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Match ATS form styles with opportunity theme */
.hi-ats-apply-content .ats-application-form {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.hi-ats-apply-content .ats-form-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--hi-text-primary, #1a1a1a);
}

.hi-ats-apply-content .ats-form-group input,
.hi-ats-apply-content .ats-form-group textarea {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
}

.hi-ats-apply-content .ats-form-group input:focus,
.hi-ats-apply-content .ats-form-group textarea:focus {
    border-color: var(--hi-primary, #3498db);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.hi-ats-apply-content .ats-btn-submit {
    background: var(--hi-primary, #3498db);
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hi-ats-apply-content .ats-btn-submit:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
}

/* ========================================
   Dashboard Integration
   ======================================== */
.hi-ats-dashboard-unified {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hi-ats-dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.hi-ats-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: var(--hi-text-secondary, #666);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hi-ats-tab:hover {
    color: var(--hi-primary, #3498db);
}

.hi-ats-tab.active {
    color: var(--hi-primary, #3498db);
    border-bottom-color: var(--hi-primary, #3498db);
}

.hi-ats-tab-content {
    display: none;
}

.hi-ats-tab-content.active {
    display: block;
}

/* ========================================
   Sync Admin Interface
   ======================================== */
.ats-sync-controls {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 30px 0;
}

.ats-sync-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.ats-sync-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ats-sync-stat-card h3 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 10px;
}

.ats-sync-stat-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hi-ats-section-header {
        flex-direction: column;
    }
    
    .hi-ats-apply-header h2 {
        font-size: 28px;
    }
    
    .hi-ats-apply-content {
        padding: 24px;
    }
    
    .hi-ats-dashboard-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .hi-ats-tab {
        white-space: nowrap;
    }
}

/* ========================================
   Smooth Scroll for Apply Section
   ======================================== */
html {
    scroll-behavior: smooth;
}

#ats-apply-section {
    scroll-margin-top: 80px;
}

/* ========================================
   Loading States
   ======================================== */
.hi-ats-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.hi-ats-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(52, 152, 219, 0.2);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: hi-ats-spin 0.8s linear infinite;
}

@keyframes hi-ats-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Success Messages
   ======================================== */
.hi-ats-success-message {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.hi-ats-success-message::before {
    content: '✓';
    font-size: 24px;
    font-weight: 700;
}
