/* assets/css/pages/uplift-analysis.css */

.uplift-dashboard {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.config-section {
    background: var(--myceo-surface-1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--myceo-border-mid);
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--myceo-border-mid);
}

.config-header h2 {
    margin: 0;
    color: var(--myceo-accent-blue);
    font-size: 1.5rem;
    font-weight: 600;
}

.config-toggle {
    background: var(--myceo-surface-2);
    color: var(--myceo-text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s;
}

.config-toggle:hover {
    background: #16356d;
}

.config-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.config-group label {
    font-weight: 600;
    color: var(--myceo-text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.config-group input,
.config-group select {
    padding: 10px 12px;
    border: 1px solid var(--myceo-border-mid);
    border-radius: 4px;
    font-size: 0.95rem;
    background: var(--myceo-surface-1);
    transition: border-color 0.3s;
}

.config-group input:focus,
.config-group select:focus {
    outline: none;
    border-color: var(--myceo-accent-blue);
    box-shadow: 0 0 0 3px rgba(10, 36, 87, 0.1);
}

.config-description {
    font-size: 0.85rem;
    color: var(--myceo-text-secondary);
    margin-top: 4px;
    font-style: italic;
}

.config-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--myceo-border-mid);
}

.btn-primary {
    background: var(--myceo-surface-2);
    color: var(--myceo-text-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #16356d;
}

.btn-secondary {
    background: var(--myceo-accent-blue);
    /* Dark ink ON the accent. Light-on-accent is 1.41:1. Fixed here rather
       than in the theme because per-dashboard stylesheets are linked AFTER
       main_style.css and therefore win - the theme cannot reach them. */
    color: var(--myceo-bg-core);
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: var(--myceo-seq-3);   /* was a light-theme gold */
}

.analysis-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--myceo-border-mid);
}

.analysis-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--myceo-text-secondary);
    transition: all 0.3s;
}

.analysis-tab:hover {
    color: var(--myceo-accent-blue);
    background: rgba(10, 36, 87, 0.05);
}

.analysis-tab.active {
    color: var(--myceo-accent-blue);
    border-bottom-color: var(--myceo-accent-blue);
    background: rgba(10, 36, 87, 0.05);
}

.results-section {
    background: var(--myceo-surface-1);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--myceo-border-mid);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--myceo-border-mid);
}

.results-header h3 {
    margin: 0;
    color: var(--myceo-accent-blue);
    font-size: 1.3rem;
    font-weight: 600;
}

.results-count {
    color: var(--myceo-text-secondary);
    font-size: 0.95rem;
    margin-top: 5px;
    display: block;
}

.export-btn {
    background: var(--myceo-accent-blue);
    /* Dark ink ON the accent. Light-on-accent measures 1.41:1. Fixed here
       rather than in the theme because per-dashboard stylesheets are
       linked AFTER main_style.css and therefore win - the theme cannot
       reach them. */
    color: var(--myceo-bg-core);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s;
}

.export-btn:hover {
    background: var(--myceo-seq-3);   /* was a light-theme gold */
}

.uplift-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.uplift-table th,
.uplift-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--myceo-border-mid);
}

.uplift-table th {
    background: var(--myceo-surface-1);
    font-weight: 600;
    color: var(--myceo-text-primary);
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.uplift-table tbody tr {
    transition: background 0.2s;
}

.uplift-table tbody tr:hover {
    background: var(--myceo-surface-2);
}

.confidence-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.tier-1 {
    background: rgba(5, 150, 105, 0.12);
    color: var(--myceo-status-good);
    border: 1px solid #c3e6cb;
}

.tier-2 {
    background: rgba(125, 211, 252, 0.16);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tier-3 {
    background: rgba(217, 119, 6, 0.12);
    color: #856404;
    border: 1px solid #ffeeba;
}

.tier-4 {
    background: rgba(225, 29, 72, 0.12);
    color: var(--myceo-status-critical);
    border: 1px solid #f5c6cb;
}

.uplift-positive {
    color: var(--myceo-status-good);
    font-weight: 600;
}

.uplift-negative {
    color: var(--myceo-status-critical);
    font-weight: 600;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

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

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

.no-data-message {
    text-align: center;
    padding: 40px;
    color: var(--myceo-text-secondary);
    font-size: 1.1rem;
    background: var(--myceo-surface-2);
    border-radius: 4px;
    border: 1px dashed var(--myceo-border-mid);
}

.info-box {
    background: var(--myceo-surface-1);
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-box p {
    margin: 0;
    color: var(--myceo-text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-box strong {
    color: var(--myceo-accent-blue);
}

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .config-content {
        grid-template-columns: 1fr;
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .analysis-tabs {
        flex-direction: column;
    }
    
    .analysis-tab {
        border-bottom: 1px solid var(--myceo-border-mid);
        border-left: 3px solid transparent;
    }
    
    .analysis-tab.active {
        border-left-color: var(--myceo-accent-blue);
        border-bottom-color: var(--myceo-border-mid);
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .export-btn {
        width: 100%;
    }
}

/* Table responsiveness */
@media (max-width: 1024px) {
    .uplift-table {
        font-size: 0.85rem;
    }
    
    .uplift-table th,
    .uplift-table td {
        padding: 8px;
    }
}