/**
 * Senna Ultimate Enhanced - Phase 1 Styles
 * Tab navigation and unified interface
 */

/* Tab Navigation */
.senna-tabs {
    display: flex;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.senna-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.senna-tab:hover {
    background: rgba(0, 0, 0, 0.02);
    color: #374151;
}

.senna-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
    background: white;
}

.senna-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.tab-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.tab-label {
    display: inline-block;
}

/* Tab Content Area */
.senna-tab-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: white;
}

.tab-panel {
    display: none;
    height: 100%;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

.tab-panel.active {
    display: block;
}

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

/* Enhanced Container */
.senna-ultimate-container.enhanced {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 480px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(120%);
    transition: transform 0.3s ease;
}

.senna-ultimate-container.enhanced.active {
    transform: translateY(0);
}

.senna-ultimate-container.enhanced.minimized {
    height: 50px;
}

.senna-ultimate-container.enhanced.minimized .senna-tabs,
.senna-ultimate-container.enhanced.minimized .senna-tab-content {
    display: none;
}

/* Analysis Tab Content */
.analysis-content {
    padding: 24px;
}

.analysis-placeholder,
.compare-placeholder,
.strategy-placeholder {
    text-align: center;
    padding: 48px 24px;
}

.analysis-placeholder h3,
.compare-placeholder h3,
.strategy-placeholder h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: #1f2937;
}

.analysis-placeholder p,
.compare-placeholder p,
.strategy-placeholder p {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 14px;
}

.btn-upload-cv,
.btn-start-comparison,
.btn-create-strategy {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload-cv:hover,
.btn-start-comparison:hover,
.btn-create-strategy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* CV Analysis View */
.cv-analysis-view {
    padding: 24px;
}

.cv-analysis-view h3 {
    margin: 0 0 24px 0;
    font-size: 18px;
    color: #1f2937;
}

.analysis-score {
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}

.score-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 8px;
}

.score-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.analysis-insights {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
}

.analysis-insights h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.analysis-insights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.analysis-insights li {
    padding: 8px 0;
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.analysis-insights li::before {
    content: '✓';
    margin-right: 8px;
    color: #10b981;
    font-weight: bold;
}

/* Simple Comparison View */
.simple-comparison {
    padding: 24px;
}

.simple-comparison h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1f2937;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.comparison-card {
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.comparison-card h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}

.comparison-card p {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #64748b;
}

.comparison-metrics {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #475569;
}

/* Simple Strategy View */
.simple-strategy {
    padding: 24px;
}

.simple-strategy h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1f2937;
}

.priority-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.priority-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.priority-list li:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.priority-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.priority-job {
    flex: 1;
}

.priority-job strong {
    display: block;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 2px;
}

.priority-job span {
    font-size: 12px;
    color: #64748b;
}

.btn-apply-now {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #6366f1;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-apply-now:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Empty States */
.compare-empty {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
}

.compare-empty p {
    margin: 8px 0;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .senna-ultimate-container.enhanced {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }
    
    .senna-tabs {
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .tab-label {
        display: none;
    }
    
    .senna-tab {
        padding: 12px 8px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* Transitions */
.senna-tab,
.tab-panel,
.btn-upload-cv,
.btn-start-comparison,
.btn-create-strategy,
.priority-list li,
.btn-apply-now {
    transition: all 0.2s ease;
}

/* Loading State */
.tab-panel.loading {
    position: relative;
}

.tab-panel.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Integration with existing Senna Ultimate */
.senna-ultimate-container:not(.enhanced) .senna-tabs {
    /* Styles for retrofitted tabs */
    margin-top: -1px;
}

.senna-ultimate-container:not(.enhanced) .ultimate-content {
    /* Ensure existing content works with tabs */
    height: 100%;
}