/**
 * Subsea Cable Map - Professional Light Theme
 * Clean, Apple-inspired design with fixed sidebar
 */

/* ============================================
   CSS Variables - Light Theme
   ============================================ */
:root {
    /* Colors */
    --bg-primary: #f5f5f7;
    --bg-sidebar: #ffffff;
    --bg-hover: #f0f0f2;
    --bg-active: #e8f0fe;
    --bg-input: #f5f5f7;
    
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #86868b;
    --text-placeholder: #aeaeb2;
    
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-light: #e8f0fe;
    
    --border: #d2d2d7;
    --border-light: #e5e5ea;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Status Colors */
    --status-active: #34c759;
    --status-planned: #ff9f0a;
    --status-wip: #5856d6;
    --status-retired: #8e8e93;
    
    /* Sizing */
    --sidebar-width: 320px;
    --header-height: 56px;
    --border-radius: 8px;
    --border-radius-sm: 6px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ============================================
   App Layout
   ============================================ */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    z-index: 100;
    overflow: hidden;
}

/* Sidebar Header / Brand */
.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.brand-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* Sidebar Sections */
.sidebar-section {
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section:last-of-type {
    border-bottom: none;
}

/* Search Section */
.search-section {
    padding: 12px 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 10px 14px;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-placeholder);
}

/* Filter Group */
.filter-group {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
}

.filter-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    transition: all 0.15s;
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s;
}

.section-header:hover {
    background: var(--bg-hover);
}

.section-title {
    flex: 1;
    text-align: left;
}

.section-badge {
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
}

.chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.section-header.collapsed .chevron {
    transform: rotate(-90deg);
}

/* Section Content */
.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}

.section-content.expanded {
    max-height: 500px;
}

/* Layer Toggles */
.layer-toggle {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.layer-toggle:hover {
    background: var(--bg-hover);
}

.layer-toggle input {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: var(--border);
    border-radius: 10px;
    position: relative;
    margin-right: 12px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.layer-toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.layer-toggle input:checked + .toggle-slider::after {
    transform: translateX(16px);
}

.layer-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.layer-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 10px;
}


.layer-group-header {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 16px 6px;
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
}

.layer-group-header:first-child {
    border-top: none;
    margin-top: 0;
}
/* Cable List */
.cables-section .section-content {
    max-height: none;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cables-section .section-content.expanded {
    max-height: none;
}

.cable-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.cable-list::-webkit-scrollbar {
    width: 6px;
}

.cable-list::-webkit-scrollbar-track {
    background: transparent;
}

.cable-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.cable-list-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}

.cable-list-item:hover {
    background: var(--bg-hover);
}

.cable-list-item.active {
    background: var(--accent-light);
    border-left-color: var(--accent);
}

.cable-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.cable-info {
    flex: 1;
    min-width: 0;
}

.cable-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cable-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.cable-status {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.cable-status.active {
    background: rgba(52, 199, 89, 0.12);
    color: var(--status-active);
}

.cable-status.planned {
    background: rgba(255, 159, 10, 0.12);
    color: var(--status-planned);
}

.cable-status.under_construction {
    background: rgba(88, 86, 214, 0.12);
    color: var(--status-wip);
}

/* Info Section */
.info-section {
    border-top: 1px solid var(--border-light);
    background: var(--bg-input);
}

.info-header {
    display: flex;
    align-items: center;
}

.close-info {
    padding: 4px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.close-info:hover {
    color: var(--text-primary);
}

.close-info svg {
    width: 16px;
    height: 16px;
}

.info-content {
    padding: 0 16px 16px;
    max-height: 300px;
    overflow-y: auto;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
}

.info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px 16px;
}

.stat-item {
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
    display: block;
}

/* BGP Section */
.bgp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px;
}

.bgp-stat {
    text-align: center;
}

.bgp-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.bgp-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
    display: block;
}

.bgp-search {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
}

.bgp-search input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
}

.bgp-search input:focus {
    border-color: var(--accent);
}

.bgp-search button {
    background: var(--accent);
    color: white;
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    transition: background 0.15s;
}

.bgp-search button:hover {
    background: var(--accent-hover);
}

.bgp-search button svg {
    width: 16px;
    height: 16px;
}

.bgp-results {
    padding: 0 16px 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.attribution {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   Map Container
   ============================================ */
.map-container {
    flex: 1;
    position: relative;
    height: 100vh;
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

/* Leaflet Customizations */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
    border-radius: var(--border-radius) !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    color: var(--text-primary) !important;
    background: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-light) !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-hover) !important;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
    color: var(--text-muted) !important;
}

.leaflet-control-attribution a {
    color: var(--text-secondary) !important;
}

/* Map Coordinates */
.map-coords {
    position: absolute;
    bottom: 24px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.coord-lat, .coord-lng {
    margin: 0 4px;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    background: var(--bg-sidebar);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    font-family: var(--font-family);
}

.leaflet-popup-tip {
    background: var(--bg-sidebar);
}

.popup-content {
    padding: 12px 16px;
}

.popup-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.popup-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.popup-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 8px;
}

.popup-status.active {
    background: rgba(52, 199, 89, 0.12);
    color: var(--status-active);
}

.popup-status.planned {
    background: rgba(255, 159, 10, 0.12);
    color: var(--status-planned);
}

.popup-status.under_construction {
    background: rgba(88, 86, 214, 0.12);
    color: var(--status-wip);
}

/* Leaflet Tooltip */
.leaflet-tooltip {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    padding: 0;
    font-family: var(--font-family);
}

.leaflet-tooltip-top::before,
.leaflet-tooltip-bottom::before,
.leaflet-tooltip-left::before,
.leaflet-tooltip-right::before {
    border-top-color: var(--bg-sidebar);
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    margin-bottom: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .map-container {
        width: 100vw;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   Right Sidebar
   ============================================ */
.sidebar-left {
    border-right: 1px solid var(--border-light);
    border-left: none;
}

.sidebar-right {
    border-left: 1px solid var(--border-light);
    border-right: none;
    order: 3;
}

/* ============================================
   Network Tools Section
   ============================================ */
.tools-section .section-content {
    max-height: none;
    overflow: visible;
}

.tools-section .section-content.expanded {
    max-height: none;
}

/* Tool Tabs */
.tool-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-light);
}

.tool-tab {
    flex: 1;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.15s;
}

.tool-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tool-tab.active {
    background: var(--bg-sidebar);
    color: var(--accent);
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

/* Tool Panels */
.tool-panel {
    display: none;
    padding: 12px;
}

.tool-panel.active {
    display: block;
}

/* Tool Input Group */
.tool-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tool-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tool-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.tool-input::placeholder {
    color: var(--text-placeholder);
}

.tool-select {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 70px;
}

.tool-select:focus {
    border-color: var(--accent);
    outline: none;
}

.tool-btn {
    background: var(--accent);
    color: white;
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}

.tool-btn:hover {
    background: var(--accent-hover);
}

.tool-btn:active {
    transform: scale(0.95);
}

.tool-btn svg {
    width: 16px;
    height: 16px;
}

.tool-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Tool Output */
.tool-output {
    background: #1e1e1e;
    border-radius: var(--border-radius-sm);
    padding: 12px;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.6;
}

.tool-output::-webkit-scrollbar {
    width: 6px;
}

.tool-output::-webkit-scrollbar-track {
    background: transparent;
}

.tool-output::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.tool-placeholder {
    color: #6e6e73;
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

.tool-output pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    color: #d4d4d4;
}

.tool-output .tool-line {
    display: block;
    padding: 1px 0;
}

.tool-output .tool-line.success {
    color: #4ec9b0;
}

.tool-output .tool-line.error {
    color: #f14c4c;
}

.tool-output .tool-line.warning {
    color: #cca700;
}

.tool-output .tool-line.info {
    color: #3794ff;
}

.tool-output .tool-line.muted {
    color: #6e6e73;
}

/* Tool Loading State */
.tool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #6e6e73;
}

.tool-loading .spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

/* BGP Stats Mini (in right sidebar) */
.bgp-stats-mini {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
}

.bgp-stat-mini {
    flex: 1;
    text-align: center;
}

.bgp-value-mini {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.bgp-label-mini {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
    margin-top: 2px;
}

/* DNS Results Table */
.dns-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.dns-results-table th,
.dns-results-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #333;
    font-size: 11px;
}

.dns-results-table th {
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
}

.dns-results-table td {
    color: #d4d4d4;
}

.dns-results-table tr:last-child td {
    border-bottom: none;
}

/* BGP Results in Tool Panel */
.bgp-result-card {
    background: #2d2d2d;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
}

.bgp-result-title {
    font-size: 13px;
    font-weight: 600;
    color: #4ec9b0;
    margin-bottom: 6px;
}

.bgp-result-meta {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.bgp-result-value {
    color: #d4d4d4;
}

/* MTR Hop Table */
.mtr-table {
    width: 100%;
    border-collapse: collapse;
}

.mtr-table th,
.mtr-table td {
    text-align: left;
    padding: 4px 6px;
    font-size: 10px;
}

.mtr-table th {
    color: #888;
    font-weight: 500;
    border-bottom: 1px solid #444;
}

.mtr-table td {
    color: #d4d4d4;
    border-bottom: 1px solid #333;
}

.mtr-table .hop-num {
    color: #888;
    width: 20px;
}

.mtr-table .hop-host {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mtr-table .hop-loss {
    color: #4ec9b0;
}

.mtr-table .hop-loss.high {
    color: #f14c4c;
}

.mtr-table .hop-latency {
    text-align: right;
}

/* Ping Stats */
.ping-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.ping-stat {
    text-align: center;
}

.ping-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #4ec9b0;
    display: block;
}

.ping-stat-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
}

/* Fix for cables section collapse */
.cables-section .section-content {
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease-out;
}

.cables-section .section-content:not(.expanded) {
    max-height: 0;
    overflow: hidden;
}

/* Credits link styling */
.credits-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.credits-link:hover {
    text-decoration: underline;
}

/* Override for cables section - proper collapse behavior */
.sidebar-right .cables-section .section-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.sidebar-right .cables-section .section-content.expanded {
    max-height: 400px !important;
    overflow-y: auto;
    opacity: 1;
}

.sidebar-right .cables-section .section-content:not(.expanded) {
    max-height: 0 !important;
    overflow: hidden;
    opacity: 0;
}

/* ============================================
   Fix: Make layers section scrollable
   ============================================ */
.sidebar-left .section-content.expanded {
    max-height: calc(100vh - 350px) !important;
    overflow-y: auto !important;
}

/* Scrollbar styling for left sidebar */
.sidebar-left .section-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-left .section-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-left .section-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-left .section-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   Terminal/Command Prompt Style for Tool Output
   ============================================ */
.tool-output {
    background: #0d1117 !important;
    border: 1px solid #30363d !important;
    border-radius: 8px !important;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Monaco', monospace !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #c9d1d9 !important;
    padding: 0 !important;
    min-height: 180px;
    max-height: 300px;
    overflow-y: auto;
    position: relative;
}

/* Terminal header bar */
.tool-output::before {
    content: '';
    display: block;
    background: linear-gradient(180deg, #21262d 0%, #161b22 100%);
    border-bottom: 1px solid #30363d;
    padding: 8px 12px;
    border-radius: 7px 7px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Terminal dots decoration */
.tool-output::after {
    content: '● ● ●';
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 9px;
    letter-spacing: 4px;
    color: transparent;
    text-shadow: 
        0 0 0 #ff5f56,
        12px 0 0 #ffbd2e,
        24px 0 0 #27c93f;
}

/* Terminal content area */
.tool-output > * {
    padding: 12px 14px;
}

.tool-output pre {
    margin: 0;
    padding: 12px 14px !important;
    background: transparent !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Terminal prompt styling */
.tool-output .tool-line {
    display: block;
    padding: 2px 0;
    color: #c9d1d9;
}

.tool-output .tool-line::before {
    content: '$ ';
    color: #7ee787;
    font-weight: 600;
}

.tool-output .tool-line.success {
    color: #7ee787 !important;
}

.tool-output .tool-line.success::before {
    content: '✓ ';
    color: #7ee787;
}

.tool-output .tool-line.error {
    color: #f85149 !important;
}

.tool-output .tool-line.error::before {
    content: '✗ ';
    color: #f85149;
}

.tool-output .tool-line.warning {
    color: #d29922 !important;
}

.tool-output .tool-line.warning::before {
    content: '⚠ ';
    color: #d29922;
}

.tool-output .tool-line.info {
    color: #58a6ff !important;
}

.tool-output .tool-line.info::before {
    content: 'ℹ ';
    color: #58a6ff;
}

.tool-output .tool-line.muted {
    color: #6e7681 !important;
}

.tool-output .tool-line.muted::before {
    content: '  ';
}

/* Loading state */
.tool-output .tool-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 14px;
    color: #8b949e;
}

.tool-output .tool-loading::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #30363d;
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: terminal-spin 0.8s linear infinite;
}

@keyframes terminal-spin {
    to { transform: rotate(360deg); }
}

/* Placeholder text */
.tool-output .tool-placeholder {
    color: #6e7681;
    padding: 20px 14px;
    font-style: italic;
}

.tool-output .tool-placeholder::before {
    content: '# ';
    color: #484f58;
}

/* Scrollbar for terminal */
.tool-output::-webkit-scrollbar {
    width: 8px;
}

.tool-output::-webkit-scrollbar-track {
    background: #0d1117;
}

.tool-output::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.tool-output::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* MTR table in terminal style */
.tool-output .mtr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin: 8px 0;
}

.tool-output .mtr-table th {
    text-align: left;
    color: #58a6ff;
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 1px solid #30363d;
}

.tool-output .mtr-table td {
    padding: 4px 8px;
    color: #c9d1d9;
    border-bottom: 1px solid #21262d;
}

.tool-output .mtr-table .hop-num {
    color: #8b949e;
    width: 30px;
}

.tool-output .mtr-table .hop-host {
    color: #7ee787;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-output .mtr-table .hop-loss {
    color: #c9d1d9;
}

.tool-output .mtr-table .hop-loss.high {
    color: #f85149;
}

.tool-output .mtr-table .hop-latency {
    color: #d2a8ff;
}

/* DNS results table */
.tool-output .dns-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin: 8px 0;
}

.tool-output .dns-results-table th {
    text-align: left;
    color: #58a6ff;
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 1px solid #30363d;
}

.tool-output .dns-results-table td {
    padding: 4px 8px;
    color: #c9d1d9;
    border-bottom: 1px solid #21262d;
}

/* BGP result card in terminal */
.tool-output .bgp-result-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
}

.tool-output .bgp-result-title {
    color: #58a6ff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.tool-output .bgp-result-meta {
    color: #8b949e;
    font-size: 11px;
    margin: 2px 0;
}

/* Ping stats in terminal */
.tool-output .ping-stats {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 1px solid #30363d;
}

.tool-output .ping-stat {
    text-align: center;
}

.tool-output .ping-stat-value {
    display: block;
    color: #7ee787;
    font-size: 16px;
    font-weight: 600;
}

.tool-output .ping-stat-label {
    display: block;
    color: #6e7681;
    font-size: 10px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Fix layers section scrolling - override all conflicting rules */
#layers-content {
    max-height: calc(100vh - 400px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#layers-content.expanded {
    max-height: calc(100vh - 400px) !important;
    overflow-y: auto !important;
}

/* Make sure the sidebar itself is scrollable */
.sidebar-left {
    overflow-y: auto !important;
    max-height: 100vh !important;
}

/* Make sidebar scrollable */
.sidebar-left {
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Remove all max-height restrictions from sections */
.sidebar-left .section-content,
.sidebar-left .section-content.expanded,
.sidebar-left #layers-content,
.sidebar-left #layers-content.expanded {
    max-height: none !important;
    overflow: visible !important;
}

/* Keep the sidebar footer at the bottom */
.sidebar-footer {
    margin-top: auto;
}

/* ============================================
   Solarized Dark Colors for Console
   ============================================ */
:root {
    /* Solarized Dark Palette */
    --sol-base03: #002b36;
    --sol-base02: #073642;
    --sol-base01: #586e75;
    --sol-base00: #657b83;
    --sol-base0: #839496;
    --sol-base1: #93a1a1;
    --sol-base2: #eee8d5;
    --sol-base3: #fdf6e3;
    --sol-yellow: #b58900;
    --sol-orange: #cb4b16;
    --sol-red: #dc322f;
    --sol-magenta: #d33682;
    --sol-violet: #6c71c4;
    --sol-blue: #268bd2;
    --sol-cyan: #2aa198;
    --sol-green: #859900;
}

/* ============================================
   Agnoster Console - Complete Restyle
   ============================================ */
.tool-output {
    background: var(--sol-base03) !important;
    border: 1px solid var(--sol-base02) !important;
    border-radius: 8px !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: var(--sol-base0) !important;
    padding: 0 !important;
    min-height: 200px;
    max-height: 350px;
    overflow-y: auto;
    position: relative;
}

/* Terminal header with window controls */
.tool-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sol-base02);
    border-bottom: 1px solid var(--sol-base01);
    padding: 8px 12px;
    border-radius: 7px 7px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.terminal-controls {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    font-size: 11px;
    color: var(--sol-base01);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terminal-fullscreen {
    background: transparent;
    border: none;
    color: var(--sol-base01);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.terminal-fullscreen:hover {
    background: var(--sol-base01);
    color: var(--sol-base03);
}

.terminal-fullscreen svg {
    width: 14px;
    height: 14px;
}

/* Terminal content area */
.tool-output-content {
    padding: 0;
}

/* Agnoster Prompt Line */
.agnoster-prompt {
    padding: 8px 12px 4px;
    font-family: inherit;
}

.prompt-line-1 {
    display: flex;
    align-items: center;
    color: var(--sol-base01);
}

.prompt-line-1::before {
    content: '┌──';
    color: var(--sol-base01);
}

.prompt-segment {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    margin: 0 2px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.prompt-segment.user {
    background: var(--sol-blue);
    color: var(--sol-base3);
}

.prompt-segment.tool {
    background: var(--sol-cyan);
    color: var(--sol-base03);
}

.prompt-segment.status {
    background: var(--sol-green);
    color: var(--sol-base03);
}

.prompt-segment.status.error {
    background: var(--sol-red);
}

/* Powerline arrow separator */
.prompt-segment::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
}

.prompt-line-2 {
    display: flex;
    align-items: center;
    padding-left: 0;
    margin-top: 2px;
}

.prompt-line-2::before {
    content: '└─';
    color: var(--sol-base01);
}

.prompt-symbol {
    color: var(--sol-green);
    font-weight: bold;
    margin-left: 4px;
    font-size: 14px;
}

.prompt-symbol.error {
    color: var(--sol-red);
}

.prompt-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--sol-base0);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Command output area */
.terminal-output {
    padding: 8px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-output pre {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: transparent;
    white-space: pre-wrap;
}

/* Output line types - Solarized colors */
.terminal-output .line {
    display: block;
    padding: 1px 0;
}

.terminal-output .line.command {
    color: var(--sol-base1);
    font-weight: 500;
}

.terminal-output .line.success {
    color: var(--sol-green);
}

.terminal-output .line.error {
    color: var(--sol-red);
}

.terminal-output .line.warning {
    color: var(--sol-yellow);
}

.terminal-output .line.info {
    color: var(--sol-blue);
}

.terminal-output .line.cyan {
    color: var(--sol-cyan);
}

.terminal-output .line.muted {
    color: var(--sol-base01);
}

/* IP addresses and numbers highlighting */
.terminal-output .ip {
    color: var(--sol-cyan);
}

.terminal-output .number {
    color: var(--sol-yellow);
}

/* Placeholder state - idle console */
.tool-output-idle {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-output-idle .agnoster-prompt {
    border-bottom: 1px solid var(--sol-base02);
}

.tool-output-idle .idle-message {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sol-base01);
    font-style: italic;
    padding: 20px;
}

/* Loading state */
.terminal-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    color: var(--sol-base01);
}

.terminal-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--sol-base02);
    border-top-color: var(--sol-cyan);
    border-radius: 50%;
    animation: terminal-spin 0.8s linear infinite;
}

@keyframes terminal-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Fullscreen Modal
   ============================================ */
.console-fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.console-fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.console-fullscreen-container {
    width: 85vw;
    max-width: 1200px;
    height: 80vh;
    background: var(--sol-base03);
    border-radius: 12px;
    border: 1px solid var(--sol-base02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.console-fullscreen-overlay.active .console-fullscreen-container {
    transform: scale(1);
}

.console-fullscreen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sol-base02);
    border-bottom: 1px solid var(--sol-base01);
    padding: 12px 16px;
}

.console-fullscreen-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sol-base1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.console-fullscreen-close {
    background: transparent;
    border: none;
    color: var(--sol-base01);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.console-fullscreen-close:hover {
    background: var(--sol-red);
    color: var(--sol-base3);
}

.console-fullscreen-close svg {
    width: 18px;
    height: 18px;
}

.console-fullscreen-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.console-fullscreen-body .agnoster-prompt {
    padding: 12px 16px 8px;
}

.console-fullscreen-body .terminal-output {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
}

/* Fullscreen scrollbar */
.console-fullscreen-body::-webkit-scrollbar {
    width: 10px;
}

.console-fullscreen-body::-webkit-scrollbar-track {
    background: var(--sol-base03);
}

.console-fullscreen-body::-webkit-scrollbar-thumb {
    background: var(--sol-base02);
    border-radius: 5px;
}

.console-fullscreen-body::-webkit-scrollbar-thumb:hover {
    background: var(--sol-base01);
}

/* ============================================
   Override previous terminal styles
   ============================================ */
.tool-output::before,
.tool-output::after {
    display: none !important;
    content: none !important;
}

/* Stats row in terminal */
.terminal-stats {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    margin-top: 8px;
    border-top: 1px solid var(--sol-base02);
    background: var(--sol-base02);
    border-radius: 0 0 7px 7px;
}

.terminal-stat {
    text-align: center;
}

.terminal-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--sol-cyan);
}

.terminal-stat-label {
    display: block;
    font-size: 10px;
    color: var(--sol-base01);
    text-transform: uppercase;
    margin-top: 2px;
}

/* Table styling in terminal */
.terminal-output table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 11px;
}

.terminal-output th {
    text-align: left;
    color: var(--sol-blue);
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 1px solid var(--sol-base02);
}

.terminal-output td {
    padding: 4px 8px;
    color: var(--sol-base0);
    border-bottom: 1px solid var(--sol-base02);
}

.terminal-output tr:last-child td {
    border-bottom: none;
}

/* BGP card in terminal */
.terminal-output .bgp-card {
    background: var(--sol-base02);
    border: 1px solid var(--sol-base01);
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
}

.terminal-output .bgp-card-title {
    color: var(--sol-blue);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.terminal-output .bgp-card-meta {
    color: var(--sol-base01);
    font-size: 11px;
    margin: 2px 0;
}

/* Tool output scrollbar - Solarized */
.tool-output::-webkit-scrollbar {
    width: 8px;
}

.tool-output::-webkit-scrollbar-track {
    background: var(--sol-base03);
}

.tool-output::-webkit-scrollbar-thumb {
    background: var(--sol-base02);
    border-radius: 4px;
}

.tool-output::-webkit-scrollbar-thumb:hover {
    background: var(--sol-base01);
}

/* ============================================
   Fish Shell Linux Style - Override Mac styling
   ============================================ */

/* Remove Mac-style terminal header */
.tool-output-header {
    display: none !important;
}

/* Simpler terminal look without window chrome */
.tool-output {
    background: var(--sol-base03) !important;
    border: none !important;
    border-left: 3px solid var(--sol-cyan) !important;
    border-radius: 0 !important;
    padding: 0 !important;
    min-height: 180px;
    max-height: 320px;
}

/* Remove any pseudo-elements that create window decorations */
.tool-output::before,
.tool-output::after {
    display: none !important;
    content: none !important;
}

/* Tool output content - direct child styling */
.tool-output-content {
    padding: 12px 16px;
    min-height: 160px;
}

/* Simpler Agnoster prompt - more Linux-like */
.agnoster-prompt {
    padding: 0 0 8px 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    border-bottom: 1px solid var(--sol-base02);
    margin-bottom: 8px;
}

.prompt-line-1 {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2px;
}

.prompt-line-1::before {
    content: '┌──(';
    color: var(--sol-base01);
    font-weight: normal;
}

.prompt-line-1::after {
    content: ')';
    color: var(--sol-base01);
}

.prompt-segment {
    display: inline;
    padding: 0;
    margin: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    background: transparent !important;
}

.prompt-segment.user {
    color: var(--sol-green);
}

.prompt-segment.user::after {
    content: '@web';
    color: var(--sol-green);
}

.prompt-segment.tool {
    color: var(--sol-blue);
}

.prompt-segment.tool::before {
    content: ')-[';
    color: var(--sol-base01);
    font-weight: normal;
}

.prompt-segment.tool::after {
    content: ']';
    color: var(--sol-base01);
    font-weight: normal;
}

.prompt-segment.status {
    background: transparent !important;
    margin-left: 4px;
}

.prompt-segment.status.error {
    color: var(--sol-red);
}

.prompt-line-2 {
    display: flex;
    align-items: center;
}

.prompt-line-2::before {
    content: '└─';
    color: var(--sol-base01);
}

.prompt-symbol {
    color: var(--sol-cyan);
    font-weight: bold;
    margin-left: 0;
    font-size: 14px;
}

.prompt-symbol.error {
    color: var(--sol-red);
}

.prompt-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--sol-base0);
    margin-left: 4px;
    animation: cursor-blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Terminal output area */
.terminal-output {
    padding: 8px 0;
    font-size: 12px;
    line-height: 1.6;
}

/* Input field flash animation */
@keyframes input-flash {
    0% { 
        box-shadow: 0 0 0 2px var(--sol-cyan);
        border-color: var(--sol-cyan);
    }
    50% { 
        box-shadow: 0 0 15px 3px var(--sol-cyan);
        border-color: var(--sol-cyan);
    }
    100% { 
        box-shadow: none;
        border-color: var(--border-light);
    }
}

.tool-input.flash {
    animation: input-flash 0.4s ease-out;
}

/* Fullscreen button - move to inline with input */
.terminal-fullscreen {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--sol-base02);
    border: 1px solid var(--sol-base01);
    color: var(--sol-base0);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}

.terminal-fullscreen:hover {
    background: var(--sol-base01);
    color: var(--sol-base3);
}

.terminal-fullscreen svg {
    width: 12px;
    height: 12px;
}

/* Tool output container needs relative positioning */
.tool-output {
    position: relative;
}

/* Fullscreen modal - also Linux style */
.console-fullscreen-overlay {
    background: rgba(0, 43, 54, 0.95) !important;
}

.console-fullscreen-container {
    border: none !important;
    border-left: 4px solid var(--sol-cyan) !important;
    border-radius: 0 !important;
}

.console-fullscreen-header {
    background: var(--sol-base02) !important;
    border-bottom: 1px solid var(--sol-base01) !important;
    padding: 10px 16px !important;
}

/* Hide the dots in fullscreen header too */
.console-fullscreen-header .terminal-controls {
    display: none !important;
}

.console-fullscreen-title {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 12px !important;
    color: var(--sol-cyan) !important;
}

.console-fullscreen-title::before {
    content: '┌──(subseacable@web)-[';
    color: var(--sol-base01);
}

.console-fullscreen-title::after {
    content: ']';
    color: var(--sol-base01);
}

.console-fullscreen-close {
    background: transparent !important;
    border: 1px solid var(--sol-base01) !important;
    color: var(--sol-base0) !important;
}

.console-fullscreen-close:hover {
    background: var(--sol-red) !important;
    border-color: var(--sol-red) !important;
    color: var(--sol-base3) !important;
}

/* Idle message styling */
.tool-output-idle {
    height: 100%;
}

.tool-output-idle .idle-message {
    color: var(--sol-base01);
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

/* Remove terminal stats fancy styling */
.terminal-stats {
    background: transparent !important;
    border-top: 1px dashed var(--sol-base02) !important;
    border-radius: 0 !important;
    padding: 10px 0 !important;
    margin-top: 10px;
}

.terminal-stat-value {
    color: var(--sol-green) !important;
}

.terminal-stat-label {
    color: var(--sol-base01) !important;
}

/* Info Panel Network Tools Section */
.info-tools-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.info-tools-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.info-tools-ip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--sol-cyan);
    background: var(--sol-base03);
    padding: 2px 8px;
    border-radius: 4px;
}

.info-tools-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.info-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.info-tool-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.info-tool-btn svg {
    width: 16px;
    height: 16px;
}

.info-tools-hostname {
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
}


/* Selected Target Display in Network Tools */
.selected-target {
    display: none;
    background: linear-gradient(135deg, var(--sol-base02) 0%, var(--sol-base03) 100%);
    border: 1px solid var(--sol-cyan);
    border-radius: 8px;
    padding: 14px;
    margin: 0 -12px 12px -12px;
    width: calc(100% + 24px);
    animation: target-appear 0.3s ease-out;
}

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

.target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.target-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sol-cyan);
    font-weight: 600;
}

.target-clear {
    background: none;
    border: none;
    color: var(--sol-base01);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 3px;
}

.target-clear:hover {
    color: var(--sol-red);
    background: rgba(220, 50, 47, 0.1);
}

.target-clear svg {
    width: 14px;
    height: 14px;
}

.target-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.target-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sol-base1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.target-ip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--sol-cyan);
    background: var(--sol-base03);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.target-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.target-action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--sol-base03);
    color: var(--sol-base1);
    border: 1px solid var(--sol-base01);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.target-action-btn:hover {
    background: var(--sol-cyan);
    color: var(--sol-base03);
    border-color: var(--sol-cyan);
    transform: translateY(-1px);
}

.target-action-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}

.target-action-btn:hover svg {
    stroke: var(--sol-base03);
}

/* Pulse animation for active target */
.selected-target.pulse {
    animation: target-pulse 0.5s ease-out;
}

@keyframes target-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(42, 161, 152, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(42, 161, 152, 0);
    }
}

/* Nmap Tool Styles */
.nmap-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.nmap-warning {
    font-size: 11px;
    color: var(--sol-yellow);
    background: rgba(181, 137, 0, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(181, 137, 0, 0.3);
}

/* Adjust target-actions for 6 buttons (3x2 grid) */
.target-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
