/* ============================================
   Context Cells - Focus View
   ============================================ */

.context-stage {
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
    overflow: hidden;
}

.stage-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke: var(--border);
    stroke-width: 2;
    fill: none;
}

.connection-line.active {
    stroke: var(--primary);
    stroke-width: 3;
}

/* Context Cell Styles */
.context-cell {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.context-cell:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    cursor: pointer;
}

.context-cell.main {
    width: 380px;
    min-height: 280px;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.context-cell.main:hover {
    cursor: default;
}

.context-cell.secondary {
    position: absolute;
    width: 280px;
}

/* Cell status colors */
.context-cell.healthy {
    border-color: var(--success);
}

.context-cell.aging {
    border-color: var(--warning);
}

.context-cell.dying {
    border-color: var(--danger);
}

.context-cell.newborn {
    border-color: #4DABF7;
}

.cell-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.cell-icon {
    font-size: 32px;
}

.cell-title {
    flex: 1;
}

.cell-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cell-status {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cell-health {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.health-bar-small {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.health-fill-small {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

.cell.aging .health-fill-small {
    background: var(--warning);
}

.cell.dying .health-fill-small {
    background: var(--danger);
}

.health-percentage {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.cell-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cell-info-item {
    display: flex;
    flex-direction: column;
}

.info-label-small {
    font-size: 10px;
    color: var(--text-tertiary);
}

.info-value-small {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.cell-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #4DABF7, #339AF0);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

/* Secondary cell positioning */
.secondary-cells .context-cell:nth-child(1) {
    top: 10%;
    left: -15%;
}

.secondary-cells .context-cell:nth-child(2) {
    top: 10%;
    right: -15%;
}

.secondary-cells .context-cell:nth-child(3) {
    bottom: 10%;
    left: -15%;
}

.secondary-cells .context-cell:nth-child(4) {
    bottom: 10%;
    right: -15%;
}

/* Mitosis Animation */
.mitosis-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mitosis-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mitosis-animation {
    text-align: center;
}

.split-line {
    width: 180px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto 18px;
    border-radius: 2px;
    animation: splitAnimation 2s ease-in-out infinite;
}

@keyframes splitAnimation {
    0%, 100% { transform: scaleX(1); opacity: 1; }
    50% { transform: scaleX(1.5); opacity: 0.5; }
}

.mitosis-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Context Selector */
.context-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.selector-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.selector-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

.selector-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 180px;
}

.selector-info span:first-child {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.selector-count {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Made with Bob */
