/* Component-specific styles */

/* Model Comparison */
.model-comparison {
    display: grid;
    gap: 2rem;
}

.model-selector-panel {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-section {
    margin-bottom: 1.5rem;
}

#modelSearch {
    margin-bottom: 1rem;
}

.filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
}

.chip:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.chip.active {
    background: var(--gray-900);
    color: white;
    border-color: var(--gray-900);
}

.chip-frontier.active {
    background: var(--tier-frontier);
    border-color: var(--tier-frontier);
}

.chip-production.active {
    background: var(--tier-production);
    border-color: var(--tier-production);
}

.chip-efficient.active {
    background: var(--tier-efficient);
    border-color: var(--tier-efficient);
}

.model-list {
    max-height: 400px;
    overflow-y: auto;
    margin: -0.5rem;
    padding: 0.5rem;
}

.model-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.15s ease;
}

.model-item:hover:not(.disabled) {
    background: white;
    border-color: var(--gray-300);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.model-item.selected {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--tier-production);
}

.model-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.model-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.75rem;
}

.provider {
    color: var(--gray-600);
}

/* Selected Models Panel */
.selected-models-panel {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.selected-models {
    min-height: 120px;
    margin: 1rem 0;
}

.selected-model-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
    background: var(--gray-100);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.selected-model-card h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
}

.remove-btn:hover {
    color: var(--error);
}

.comparison-actions {
    display: flex;
    gap: 0.5rem;
}

/* Comparison Results */
.comparison-results {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comparison-table-container h3 {
    margin-bottom: 1rem;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.comparison-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    position: sticky;
    top: 0;
}

.model-header {
    min-width: 150px;
}

.attribute-label {
    font-weight: 500;
    color: var(--gray-700);
}

.comparison-table td.check {
    color: var(--success);
}

.comparison-table td.cross {
    color: var(--error);
}

.comparison-table.highlight-differences td.different {
    background: rgba(245, 158, 11, 0.1);
}

.section-header td {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-900);
    padding-top: 1rem;
}

.comparison-charts {
    margin-top: 2rem;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Tier Analyzer */
.tier-overview {
    margin-bottom: 2rem;
}

.tier-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tier-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.tier-card.tier-frontier {
    border-color: rgba(147, 51, 234, 0.2);
}

.tier-card.tier-production {
    border-color: rgba(59, 130, 246, 0.2);
}

.tier-card.tier-efficient {
    border-color: rgba(16, 185, 129, 0.2);
}

.tier-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tier-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.tier-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.tier-stats .stat {
    text-align: center;
}

.tier-stats .label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.tier-stats .value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.tier-info {
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

.tier-info .description {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin: 0 0 0.5rem 0;
}

.tier-info .use-case {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin: 0;
}

/* Heatmap */
.usage-heatmap {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.heatmap-grid {
    display: grid;
    gap: 1.5rem;
}

.heatmap-tier h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.heatmap-models {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.heatmap-cell {
    padding: 0.75rem;
    border-radius: 0.375rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.heatmap-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heatmap-cell .model-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.heatmap-cell .request-count {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Recommendations */
.recommendations-grid {
    display: grid;
    gap: 1rem;
}

.recommendation-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.recommendation-card:hover {
    border-color: var(--tier-production);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.rec-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.rec-header h4 {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.savings-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.rec-description {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin: 0 0 0.75rem 0;
}

.rec-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}

.current-state,
.suggested-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rec-impact {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* What-If Analysis */
.what-if-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scenario-builder {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 1rem;
}

.model-move-row {
    display: grid;
    grid-template-columns: 1fr auto 100px;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.model-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.usage-info {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-align: right;
}

.scenario-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.scenario-results {
    background: var(--gray-50);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.scenario-results h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 1rem 0;
}

.savings-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.savings-display .currency {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 0.25rem;
}

.savings-display .period {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.savings-display.highlight .currency {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.breakdown-list {
    font-size: 0.8125rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.model-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.savings-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.savings-info .amount {
    font-weight: 600;
    color: var(--success);
}

.savings-info .percentage {
    color: var(--gray-600);
}

/* Cost Optimizer */
.total-savings {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
}

.total-savings .label {
    color: var(--gray-600);
}

.total-savings .amount {
    font-weight: 700;
    color: var(--success);
}

.opportunities-list {
    display: grid;
    gap: 1rem;
}

.opportunity-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.opportunity-card.priority-high {
    border-left-color: var(--error);
}

.opportunity-card.priority-medium {
    border-left-color: var(--warning);
}

.opportunity-card.priority-low {
    border-left-color: var(--success);
}

.opp-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.opp-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--gray-700);
}

.opp-header h4 {
    font-size: 1rem;
    margin: 0;
}

.opp-details {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opp-actions {
    display: flex;
    gap: 0.5rem;
}

.substitutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.substitution-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.substitution-card:hover {
    border-color: var(--tier-production);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.models-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.current-model,
.suggested-model {
    text-align: center;
}

.current-model .label,
.suggested-model .label {
    font-size: 0.75rem;
    color: var(--gray-600);
    display: block;
    margin-bottom: 0.25rem;
}

.current-model h5,
.suggested-model h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.current-model .cost,
.suggested-model .cost {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    display: block;
    margin-top: 0.5rem;
}

.arrow-container {
    text-align: center;
}

.arrow-container .savings {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
    margin-top: 0.25rem;
}

.comparison-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.375rem;
}

.comparison-metrics .metric {
    text-align: center;
}

.comparison-metrics .label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.comparison-metrics .value {
    font-size: 0.875rem;
    font-weight: 500;
}

.comparison-metrics .value.minimal {
    color: var(--success);
}

.comparison-metrics .value.low {
    color: var(--info);
}

.comparison-metrics .value.medium {
    color: var(--warning);
}

.comparison-metrics .value.high {
    color: var(--error);
}

.patterns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.pattern-card {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
}

.pattern-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.pattern-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.pattern-content .description {
    font-size: 0.8125rem;
    color: var(--gray-700);
    margin: 0 0 0.5rem 0;
}

.pattern-content .insight {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-style: italic;
    margin: 0;
}

.roadmap {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.roadmap-step {
    flex-shrink: 0;
    width: 250px;
    background: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    position: relative;
}

.roadmap-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--gray-400);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--tier-production);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.step-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.step-content .duration {
    font-size: 0.75rem;
    color: var(--gray-600);
    display: block;
    margin-bottom: 0.75rem;
}

.step-items {
    font-size: 0.8125rem;
    color: var(--gray-700);
    margin: 0;
    padding-left: 1.25rem;
}

.step-items li {
    margin-bottom: 0.25rem;
}

/* Empty States */
.no-results,
.no-opportunities,
.no-substitutions,
.no-recommendations,
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.no-opportunities {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.no-opportunities .icon {
    font-size: 3rem;
    color: var(--success);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .scenario-builder {
        grid-template-columns: 1fr;
    }
    
    .model-move-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .model-info,
    .usage-info {
        display: block;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 768px) {
    .substitutions-grid {
        grid-template-columns: 1fr;
    }
    
    .roadmap {
        flex-direction: column;
    }
    
    .roadmap-step {
        width: 100%;
    }
    
    .roadmap-step:not(:last-child)::after {
        content: "↓";
        right: 50%;
        top: auto;
        bottom: -1.5rem;
        transform: translateX(50%);
    }
}

/* Model Availability Styles (added 2025-10-03) */
.model-unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.model-unavailable::after {
    content: "UNAVAILABLE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    pointer-events: none;
    white-space: nowrap;
}

.model-unavailable:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-200) !important;
    box-shadow: none !important;
}

/* Endpoint Badges */
.endpoint-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
    display: inline-block;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.endpoint-chat {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.endpoint-responses {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

/* Model Deprecated Warning Banner */
.deprecated-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.1);
}

.deprecated-warning .icon {
    font-size: 1.5rem;
    color: #f57c00;
    flex-shrink: 0;
}

.deprecated-warning .content {
    flex: 1;
}

.deprecated-warning .content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e65100;
    margin: 0 0 0.25rem 0;
}

.deprecated-warning .content p {
    font-size: 0.875rem;
    color: #f57c00;
    margin: 0;
}

.deprecated-warning .close-btn {
    background: none;
    border: none;
    color: #f57c00;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s ease;
}

.deprecated-warning .close-btn:hover {
    color: #e65100;
}

/* Availability Notes Tooltip */
.availability-tooltip {
    position: relative;
    display: inline-block;
}

.availability-tooltip .tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: rgba(33, 33, 33, 0.95);
    color: white;
    text-align: left;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 0.8125rem;
    line-height: 1.4;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.availability-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(33, 33, 33, 0.95) transparent transparent transparent;
}

.availability-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ========================================================================
   PHASE 2B: LIFECYCLE MANAGEMENT STYLES
   Added: October 7, 2025
   Purpose: Visual indicators for model lifecycle states (active, legacy, graveyard)
   ======================================================================== */

/* ----------------------------------------
   Lifecycle Badge Base Styles
   ---------------------------------------- */

.lifecycle-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.2s ease;
    vertical-align: middle;
}

/* ----------------------------------------
   Lifecycle Badge Variants
   Following existing tier color system
   ---------------------------------------- */

/* Active - Green (matches --success) */
.lifecycle-badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.lifecycle-badge-active:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
}

/* Legacy - Purple (matches --tier-frontier) */
.lifecycle-badge-legacy {
    background: rgba(147, 51, 234, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.lifecycle-badge-legacy:hover {
    background: rgba(147, 51, 234, 0.15);
    border-color: rgba(147, 51, 234, 0.4);
}

/* Deprecated - Orange/Amber (matches --warning) */
.lifecycle-badge-deprecated {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: lifecycle-pulse 2s ease-in-out infinite;
}

.lifecycle-badge-deprecated:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    animation: none; /* Stop pulse on hover for readability */
}

/* Sunset - Red (matches --error) */
.lifecycle-badge-sunset {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.lifecycle-badge-sunset:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Graveyard - Gray (uses existing gray scale) */
.lifecycle-badge-graveyard {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.lifecycle-badge-graveyard:hover {
    background: rgba(107, 114, 128, 0.15);
    border-color: rgba(107, 114, 128, 0.4);
}

/* ----------------------------------------
   Pulse Animation for Deprecated Models
   ---------------------------------------- */

@keyframes lifecycle-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.75;
        transform: scale(0.98);
    }
}

/* ----------------------------------------
   Model Item Deprecation Styling
   Applied to model cards/items
   ---------------------------------------- */

.model-item.model-deprecated {
    opacity: 0.85;
    background: rgba(245, 158, 11, 0.02);
}

.model-item.model-deprecated:hover {
    background: rgba(245, 158, 11, 0.05);
}

.model-item.model-sunset {
    opacity: 0.8;
    background: rgba(239, 68, 68, 0.02);
}

.model-item.model-sunset:hover {
    background: rgba(239, 68, 68, 0.05);
}

.model-item.model-graveyard {
    opacity: 0.65;
    background: rgba(107, 114, 128, 0.02);
}

.model-item.model-graveyard:hover {
    background: rgba(107, 114, 128, 0.05);
}

/* ----------------------------------------
   Deprecation Warning Banner
   Follows Bootstrap alert pattern
   ---------------------------------------- */

.deprecation-warning {
    display: none; /* Hidden by default, shown via JavaScript */
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fbbf24;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
    animation: slideDown 0.3s ease-out;
}

.deprecation-warning.visible {
    display: flex;
}

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

.deprecation-warning-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.deprecation-warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.deprecation-warning-content {
    flex: 1;
}

.deprecation-warning-title {
    font-weight: 600;
    color: #92400e;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.deprecation-warning-message {
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.deprecation-warning ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.deprecation-warning li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.deprecation-warning li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
    font-size: 0.75rem;
}

.deprecation-warning strong {
    font-weight: 600;
    color: #78350f;
}

.deprecation-warning small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #a16207;
}

/* ----------------------------------------
   Replacement Model Suggestion Links
   ---------------------------------------- */

.replacement-link {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.15s ease;
}

.replacement-link:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.replacement-arrow {
    display: inline-block;
    margin: 0 0.25rem;
    color: #6b7280;
    font-weight: 400;
}

/* ----------------------------------------
   Lifecycle Filter Chips
   Optional filter UI component
   ---------------------------------------- */

.lifecycle-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.lifecycle-filter-chip {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 2px solid transparent;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.lifecycle-filter-chip:hover {
    background: var(--gray-200);
}

.lifecycle-filter-chip.active {
    border-color: var(--tier-production);
    background: rgba(59, 130, 246, 0.1);
    color: var(--tier-production);
}

/* ----------------------------------------
   Model Catalog Table Styles
   For lifecycle column in model tables
   ---------------------------------------- */

.model-lifecycle-cell {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.model-lifecycle-details {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.model-lifecycle-details .date {
    font-weight: 500;
    color: var(--gray-700);
}

/* ----------------------------------------
   Inline Lifecycle Indicators
   For compact display in dropdowns/lists
   ---------------------------------------- */

.lifecycle-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.lifecycle-indicator-active {
    background: #10b981;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

.lifecycle-indicator-deprecated {
    background: #f59e0b;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
    animation: lifecycle-pulse 2s ease-in-out infinite;
}

.lifecycle-indicator-sunset {
    background: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.lifecycle-indicator-graveyard {
    background: #6b7280;
    box-shadow: 0 0 4px rgba(107, 114, 128, 0.4);
}

.lifecycle-indicator-legacy {
    background: #9333ea;
    box-shadow: 0 0 4px rgba(147, 51, 234, 0.4);
}

/* ----------------------------------------
   Accessibility Improvements
   ---------------------------------------- */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lifecycle-badge {
        border-width: 2px;
    }

    .deprecation-warning {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .lifecycle-badge-deprecated,
    .lifecycle-indicator-deprecated,
    .deprecation-warning {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.replacement-link:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

.lifecycle-filter-chip:focus {
    outline: 2px solid var(--tier-production);
    outline-offset: 2px;
}

/* ----------------------------------------
   Responsive Adjustments
   ---------------------------------------- */

@media (max-width: 768px) {
    .deprecation-warning {
        padding: 0.875rem 1rem;
    }

    .deprecation-warning-title {
        font-size: 0.9375rem;
    }

    .deprecation-warning-message {
        font-size: 0.8125rem;
    }

    .lifecycle-badge {
        font-size: 0.625rem;
        padding: 0.1875rem 0.5rem;
    }

    .lifecycle-filters {
        gap: 0.375rem;
    }

    .lifecycle-filter-chip {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
}

/* ----------------------------------------
   Print Styles
   ---------------------------------------- */

@media print {
    .deprecation-warning {
        border-color: #000;
        background: #fff;
        box-shadow: none;
    }

    .lifecycle-badge {
        border-color: #000;
    }

    .lifecycle-badge-deprecated,
    .lifecycle-indicator-deprecated {
        animation: none;
    }
}

/* END PHASE 2B LIFECYCLE STYLES */

/* ========================================
   MODEL TYPE SECTIONS (ALIAS vs SNAPSHOT)
   ======================================== */

/* Model Type Sections - Only shown when provider has both types */
.model-type-section {
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.model-type-header {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-type-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.model-type-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
}

.model-type-subtitle {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 400;
    margin-top: 0.125rem;
    line-height: 1.4;
}

.model-type-count {
    margin-left: auto;
    background: #ffffff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.model-type-items {
    padding: 0;
    background: white;
}

.model-type-list {
    padding: 0;
    background: white;
}

/* Alias section accent - Blue left border */
.model-type-section[data-section-type="alias"] .model-type-header {
    border-left: 4px solid #3b82f6;
}

.model-type-section[data-section-type="alias"] .model-type-count {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Snapshot section accent - Gray left border */
.model-type-section[data-section-type="snapshot"] .model-type-header {
    border-left: 4px solid #6b7280;
}

.model-type-section[data-section-type="snapshot"] .model-type-count {
    color: #6b7280;
    border-color: #9ca3af;
    background: #f9fafb;
}

/* Alias warning banner */
.alias-warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    display: none;
    animation: slideDown 0.3s ease;
}

.alias-warning.show {
    display: block;
}

.alias-warning strong {
    color: #92400e;
}

.alias-warning-icon {
    font-size: 1.2rem;
    margin-right: 8px;
    vertical-align: middle;
}

#aliasDetails {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #78350f;
    padding-left: 28px;
}

/* Filter checkbox styling */
.model-filter-controls {
    margin: 12px 0;
    padding: 12px;
    background-color: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
    user-select: none;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Animation for warning banner */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------
   Responsive Adjustments for Model Sections
   ---------------------------------------- */

@media (max-width: 768px) {
    .model-type-header {
        padding: 10px 12px;
    }

    .model-type-title {
        font-size: 0.875rem;
    }

    .model-type-subtitle {
        font-size: 0.75rem;
    }

    .model-type-count {
        font-size: 0.6875rem;
        padding: 1px 8px;
    }

    .alias-warning {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    #aliasDetails {
        font-size: 0.8rem;
        padding-left: 20px;
    }

    .model-filter-controls {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .model-type-header {
        padding: 8px 10px;
        gap: 6px;
    }

    .model-type-icon {
        font-size: 1.1rem;
    }

    .model-type-title {
        font-size: 0.8125rem;
    }

    .model-type-subtitle {
        display: none; /* Hide subtitle on very small screens */
    }

    .model-type-count {
        font-size: 0.625rem;
        padding: 1px 6px;
    }

    .alias-warning {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

/* Print styles for sections */
@media print {
    .model-type-section {
        border-color: #000;
        page-break-inside: avoid;
    }

    .model-type-header {
        background: #f5f5f5 !important;
        border-color: #000;
    }

    .alias-warning {
        border-color: #000;
        background: #fff;
    }
}

/* END MODEL TYPE SECTIONS */