/* Mission Control Overview - Clean Centered Layout */

/* Main container */
.mc-overview-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* Stats row at top */
.mc-overview-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.mc-stat-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-stat-icon img {
    width: 32px;
    height: 32px;
    filter: brightness(0) saturate(100%) invert(58%) sepia(84%) saturate(2044%) hue-rotate(178deg) brightness(102%) contrast(101%);
}

.mc-stat-content {
    flex: 1;
}

.mc-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1;
}

.mc-stat-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Dashboard layout - Map centered with tiles around */
.mc-overview-dashboard {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0; /* Prevent flex items from growing infinitely */
}

.mc-dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Side columns */
.mc-side-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
}

/* Tiles */
.mc-tile {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mc-tile-header {
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mc-tile-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.mc-tile-body {
    padding: 16px;
    flex: 1;
    overflow: hidden;
}

/* Center map */
.mc-center-map {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0; /* Allow it to shrink */
    align-items: center;
    justify-content: flex-start; /* Align to top instead of center */
}

.mc-map-container {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    position: relative;
    height: auto; /* Let height be determined by content */
}

.mc-map-header {
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.mc-map-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
}

.mc-map-body {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

#mc-orbital-view {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0a0e1a;
    min-height: 300px; /* Ensure minimum height */
}

/* Canvas styling without wrapper */
.simulation-2d-canvas {
    display: block;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    width: 100% !important;
    height: 100% !important;
}

/* Alerts tile */
.mc-tile-alerts {
    flex: 0 0 200px;
}

.mc-no-alerts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    text-align: center;
}

.mc-no-alerts img {
    width: 32px;
    height: 32px;
    opacity: 0.5;
    filter: brightness(0) saturate(100%) invert(58%) sepia(84%) saturate(2044%) hue-rotate(178deg) brightness(102%) contrast(101%);
}

.mc-no-alerts p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.mc-alert-count {
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
}

/* Quick Actions - Compact */
.mc-tile-actions {
    flex: 0 0 auto;
}

.mc-quick-actions-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mc-action-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-action-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #00d4ff;
    transform: translateY(-1px);
}

.mc-action-btn img {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(58%) sepia(84%) saturate(2044%) hue-rotate(178deg) brightness(102%) contrast(101%);
}

/* Activity Feed */
.mc-tile-activity {
    flex: 1;
    min-height: 0; /* Allow it to shrink */
    display: flex;
    flex-direction: column;
}

.mc-activity-scroll {
    height: 100%;
    overflow-y: auto;
    padding-right: 8px;
}

.mc-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 13px;
}

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

.mc-activity-time {
    font-size: 11px;
    color: #64748b;
    min-width: 40px;
}

.mc-activity-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
    margin-top: 5px;
}

.mc-activity-icon.pass { background: #10b981; }
.mc-activity-icon.data { background: #3b82f6; }
.mc-activity-icon.command { background: #f59e0b; }
.mc-activity-icon.alert { background: #ef4444; }

.mc-activity-text {
    flex: 1;
    color: #e2e8f0;
    line-height: 1.4;
}

/* Timeline */
.mc-tile-timeline {
    flex: 0 0 auto;
}

.mc-timeline-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mc-timeline-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 6px;
    border-left: 3px solid #64748b;
    font-size: 13px;
}

.mc-timeline-item.upcoming { border-left-color: #3b82f6; }
.mc-timeline-item.maintenance { border-left-color: #f59e0b; }
.mc-timeline-item.command { border-left-color: #10b981; }

.mc-timeline-time {
    font-size: 12px;
    font-weight: 600;
    color: #00d4ff;
    min-width: 45px;
}

.mc-timeline-content {
    flex: 1;
}

.mc-timeline-title {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
}

.mc-timeline-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Scrollbar styling */
.mc-activity-scroll::-webkit-scrollbar,
.mc-side-column::-webkit-scrollbar {
    width: 6px;
}

.mc-activity-scroll::-webkit-scrollbar-track,
.mc-side-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.mc-activity-scroll::-webkit-scrollbar-thumb,
.mc-side-column::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.mc-activity-scroll::-webkit-scrollbar-thumb:hover,
.mc-side-column::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .mc-dashboard-layout {
        grid-template-columns: 240px 1fr 240px;
    }
}

@media (max-width: 1200px) {
    .mc-overview-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mc-dashboard-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .mc-side-column {
        flex-direction: row;
    }
    
    .mc-tile {
        flex: 1;
    }
    
    .mc-center-map {
        min-height: 500px;
    }
}