/**
 * LEOS Mission Ready - SDA Interface Styles
 * Styles for the integrated Space Domain Awareness interface
 */

/* SDA Integrated View */
.sda-integrated-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
}

/* Sub Navigation */
.sda-sub-nav {
    display: flex;
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding: 0 20px;
    gap: 20px;
}

.sda-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.sda-tab:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
}

.sda-tab.active {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

/* Main Content Layout */
.sda-main-content {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

/* Simulation Panel (Left) */
.sda-simulation-panel {
    flex: 2.5;
    position: relative;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

#sda-canvas-container {
    width: 100%;
    height: 100%;
}

/* Fullscreen mode */
.sda-simulation-panel.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.sda-simulation-panel.fullscreen .sda-sim-controls {
    padding: 20px;
}

/* Simulation Controls */
.sda-sim-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95), transparent);
    pointer-events: none;
}

.sda-sim-controls > * {
    pointer-events: auto;
}

.sda-beta-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 200, 0, 0.1);
    border: 1px solid rgba(255, 200, 0, 0.3);
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 12px;
    color: #ffc800;
    margin-bottom: 10px;
}

.beta-badge {
    background: #ffc800;
    color: #1e293b;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
}

/* Quick Toggles */
.sda-quick-toggles {
    display: flex;
    gap: 10px;
}

.sda-quick-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sda-quick-toggle:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
    color: #94a3b8;
}

.sda-quick-toggle.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
}

.sda-quick-toggle img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(45%) sepia(9%) saturate(685%) hue-rotate(178deg) brightness(94%) contrast(89%);
}

.sda-quick-toggle.active img {
    filter: brightness(0) saturate(100%) invert(53%) sepia(95%) saturate(468%) hue-rotate(151deg) brightness(99%) contrast(105%);
}

/* Content Panel (Right) */
.sda-content-panel {
    flex: 1;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    max-height: 100%;
}

/* Tab Content */
.sda-tab-content {
    display: none;
}

.sda-tab-content.active {
    display: block;
}

/* Statistics Grid */
.sda-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.sda-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sda-stat-card:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
}

.stat-icon img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(53%) sepia(95%) saturate(468%) hue-rotate(151deg) brightness(99%) contrast(105%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Classification Panel */
.sda-classification-panel,
.sda-performance-panel {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sda-classification-panel h3,
.sda-performance-panel h3 {
    margin: 0 0 15px 0;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
}

/* Orbit Toggles */
.sda-orbit-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sda-orbit-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sda-orbit-toggle:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(0, 212, 255, 0.2);
}

.sda-orbit-toggle.highlight {
    background: rgba(255, 200, 0, 0.05);
    border-color: rgba(255, 200, 0, 0.2);
}

.orbit-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orbit-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.orbit-color.leo { background: #33ffff; }
.orbit-color.meo { background: #ffff33; }
.orbit-color.geo { background: #ff3333; }
.orbit-color.heo { background: #ff33ff; }
.orbit-color.debris { background: #ff8833; }

.orbit-details {
    display: flex;
    flex-direction: column;
}

.orbit-name {
    font-size: 14px;
    color: #e2e8f0;
    font-weight: 500;
}

.orbit-count {
    font-size: 12px;
    color: #64748b;
}

.orbit-desc {
    font-size: 11px;
    color: #64748b;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #475569;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: #1e293b;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #00d4ff;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: white;
}

/* Performance Warning */
.performance-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 200, 0, 0.1);
    border: 1px solid rgba(255, 200, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #ffc800;
}

.performance-warning img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(73%) sepia(96%) saturate(415%) hue-rotate(5deg) brightness(103%) contrast(107%);
}

/* Filter Panel */
.sda-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

.range-slider {
    position: relative;
    margin: 10px 0;
}

.range-slider input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #334155;
    outline: none;
    border-radius: 3px;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #00d4ff;
    cursor: pointer;
    border-radius: 50%;
}

.range-values {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
}

.filter-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00d4ff;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #00d4ff;
    color: #0f172a;
}

.btn-primary:hover {
    background: #00a8cc;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #475569;
}

.btn-secondary:hover {
    background: rgba(71, 85, 105, 0.2);
    border-color: #64748b;
}

/* Database Tab */
.database-header {
    margin-bottom: 20px;
}

.database-header h3 {
    margin: 0 0 15px 0;
    color: #e2e8f0;
    font-size: 18px;
}

.database-controls {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
}

.search-input::placeholder {
    color: #64748b;
}

.search-input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(15, 23, 42, 0.8);
}

.filter-select {
    padding: 10px 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
}

.satellite-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.satellite-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.satellite-item:hover {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(0, 212, 255, 0.3);
}

.sat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sat-info {
    flex: 1;
}

.sat-name {
    font-size: 14px;
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 4px;
}

.sat-details {
    font-size: 12px;
    color: #64748b;
}

.sat-track-btn {
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 4px;
    color: #00d4ff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sat-track-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.list-loading,
.no-results {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 14px;
}

/* Analytics Tab */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.analytics-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.analytics-card h4 {
    margin: 0 0 15px 0;
    color: #e2e8f0;
    font-size: 16px;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: rgba(30, 41, 59, 0.2);
    border: 1px dashed rgba(0, 212, 255, 0.2);
    border-radius: 6px;
}

.chart-placeholder img {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.chart-placeholder p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

/* Alerts Tab */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.alert-item.high {
    border-color: rgba(255, 71, 87, 0.3);
    background: rgba(255, 71, 87, 0.05);
}

.alert-item.medium {
    border-color: rgba(255, 200, 0, 0.3);
    background: rgba(255, 200, 0, 0.05);
}

.alert-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
}

.alert-item.medium .alert-icon {
    background: rgba(255, 200, 0, 0.1);
}

.alert-icon img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(41%) sepia(84%) saturate(2067%) hue-rotate(334deg) brightness(102%) contrast(102%);
}

.alert-item.medium .alert-icon img {
    filter: brightness(0) saturate(100%) invert(73%) sepia(96%) saturate(415%) hue-rotate(5deg) brightness(103%) contrast(107%);
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    margin: 0 0 5px 0;
    color: #e2e8f0;
    font-size: 15px;
}

.alert-content p {
    margin: 0 0 10px 0;
    color: #94a3b8;
    font-size: 13px;
}

.alert-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #64748b;
}

.alert-details span {
    padding: 4px 8px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sda-main-content {
        flex-direction: column;
    }
    
    .sda-simulation-panel {
        height: 400px;
    }
    
    .sda-stats-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}