/* ==============================
   🔹 CSS VARIABLES (Dark Mode Only)
   - These define the global colors and styles for the entire application
================================= */
:root {
    --map-bg: transparent; /* Keeps background transparent */
    --connection-color: darkgrey; /* Color for system connections (links between nodes) */
    --system-color: #0000FF; /* Color for system nodes */
	--playerlocation-color: #00Ff00;
    --text-color: white; /* General text color */
    --shadow-color: #000000; /* Shadows for text and elements */
    --system-font: bold 13px Helvetica, Arial, sans-serif; /* Font used for system names */
    --text-shadow-blur: 20; /* Shadow blur effect for text */
}

/* ==============================
   🔹 GLOBAL STYLES (Always Dark Mode)
================================= */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--map-bg); /* Uses transparent background */
    color: var(--text-color); /* Sets default text color */
    transition: background 0.3s, color 0.3s; /* Smooth transition effect */
    display: flex; /* Enables layout flexibility */
}

/* ==============================
   🔹 SIDEBAR (Navigation & Login)
================================= */
.sidebar {
    width: 250px; /* Fixed sidebar width */
    background: #222; /* Dark background */
    color: white; /* Text color */
    height: 100vh; /* Full screen height */
    position: fixed; /* Stays in place when scrolling */
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

/* 🔹 Logo Styling */
.logo {
    width: 180px; /* Logo size */
    margin-bottom: 20px;
}

/* 🔹 Sidebar Navigation */
.nav-links {
    width: 100%;
    text-align: center;
}

.nav-links h4 {
    color: #ddd;
    margin-bottom: 15px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    text-align: center;
}

.nav-links a:hover,
.nav-links a.active {
    background: #495057; /* Highlights active and hovered links */
}

/* ==============================
   🔹 AUTH SECTION (Login / Logout)
================================= */
.auth-section {
    margin-top: auto;
    padding-bottom: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* Ensures it doesn’t overflow */
}

.eve-sso-button {
	max-width: 180px; /* Same width as login button */
    height: auto; /* Keeps aspect ratio */
    display: block;
    padding: 10px 0; /* Adjust padding for similar height */
    text-align: center; /* Centers text */
    font-size: 16px; /* Ensures similar font size */
}
.eve-logout-button {
    width: 180px; /* Same width as login button */
    height: auto; /* Keeps aspect ratio */
    display: block;
    padding: 10px 0; /* Adjust padding for similar height */
    text-align: center; /* Centers text */
    font-size: 16px; /* Ensures similar font size */
}

/* ==============================
   🔹 MAIN CONTENT AREA
================================= */
.content {
    margin-left: 250px; /* Prevents overlap with sidebar */
    padding: 0;
    width: calc(100vw - 250px); /* Fills the rest of the screen */
    height: 100vh; /* Full height */
    overflow: hidden; /* Prevents scrolling */
    position: relative;
    background: /*url("/assets/img/bg12.png")*/ no-repeat center center fixed; /* Background image */
    background-size: cover; /* Ensures full coverage */
}

/* ==============================
   🔹 MAP TITLE (ANCHOR TO TOP LEFT)
   - Fixed so it always stays visible
================================= */
.intel-map-container {
    background: transparent; /* No background interference */
}

.map-title {
    position: fixed;
    top: 10px;
    left: 260px; /* Ensures title stays in place */
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    z-index: 1000; /* Ensures it's above other elements */
}

/* ==============================
   🔹 REGION SELECTOR (UPPER RIGHT)
   - Allows changing the displayed region
================================= */
.dropdown-container {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1000; /* Keeps it on top */
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    padding: 5px 10px;
    border-radius: 5px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 🔹 Dropdown text styling */
.dropdown-container label {
    color: white;
}

/* 🔹 Dropdown selection styling */
.dropdown-container select {
    background: #D3D3D3;
    color: black;
    border: 1px solid #aaa;
}

/* ==============================
   🔹 MAP CONTAINER & CANVAS
================================= */
/* ?? Adjust the Map Container to leave space for the Intel Log */
#map-container {
    position: fixed;
    top: 75px; /* Space for title */
    left: 250px; /* Space for sidebar */
    width: calc(100vw - 625px); /* 650px accounts for sidebar + log */
    height: calc(100vh - 100px);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: hidden;
}


/* 🔹 The actual map canvas */
#map-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background-color: none; /* Prevents background interference */
}


/* ==============================
   ? SETTINGS PAGE STYLES
============================== */

/* Settings container box */
.settings-box {
    background: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    color: white;
    width: 100%;
    max-width: 980px;
    padding: 20px 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.6);
}

.settings-title {
    color: white;
    font-size: 28px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.8); /* semi-transparent black */
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
    display: inline-block;
}

/* Left and right columns */
.settings-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 280px;
    flex: 1;
}

/* Section headers inside settings box */
.settings-box h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Standard form spacing */
.settings-box .mb-3 {
    margin-bottom: 1rem !important;
}

/* Refresh rate form radio buttons */
#refresh-rate-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
}

/* Alert sound select */
#alert-sound {
    width: 100%;
}

/* Track player checkbox styling */
#track-player {
    cursor: pointer;
    margin-right: 8px;
}

#track-player:checked + label {
    font-weight: bold;
    color: #00ff00;
}

/* Background thumbnails container (scrollable) */
.background-scroll {
    max-height: 200px;
    overflow-y: auto;
    background-color: rgba(20, 20, 20, 0.6);
    border: 1px solid #444;
    border-radius: 6px;
}

/* Thumbnails grid */
.background-scroll .d-flex.flex-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 6px;
}

/* Individual thumbnail label */
.bg-label {
    width: 90px;
    height: 55px;
    position: relative;
}

/* Thumbnail image inside label */
.bg-label img.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid transparent;
    transition: 0.3s ease-in-out;
}

/* Highlight selected thumbnail */
.bg-label input[type="radio"]:checked + img {
    border-color: yellow;
    transform: scale(1.05);
}

/* ==============================
   🔹 Intel Log (Updated)
================================= */
/* ✅ Intel Log Container with Scroll */
/* ?? FIX: Ensure Intel Log stays aligned next to the map */
#intel-log-container {
    position: fixed; /* Keeps it in place */
    right: 20px; /* Position to the right */
    top: 100px; /* Adjusted for title spacing */
    width: 350px; /* Fixed width */
    height: calc(100% - 120px); /* Dynamic height */
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent dark */
    color: white;
    border: 1px solid #666;
    padding: 10px;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    z-index: 10; /* Ensure it's above background but BELOW the map */
}

/* ? Ensure Log doesn't overflow */
#intel-log {
    flex-grow: 1;
    overflow-y: auto !important; /* Forces scrolling */
    max-height: 100%;
    font-size: 14px;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: #555 #222;
}

/* ? Ensure the Log does not block the Map */
#intel-log-container:hover {
    z-index: 10000; /* Brings it to the front only when hovered */
}

/* ✅ WebKit (Chrome, Edge, Safari) Scrollbar */
#intel-log::-webkit-scrollbar {
    width: 6px; /* Small but usable */
}

#intel-log::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

#intel-log::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

#intel-log::-webkit-scrollbar-thumb:hover {
    background: #888;
}
/* 🔹 Title Styling */
#intel-log-container h3 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}

/* 🔹 Intel Log Entry */
.intel-entry {
    padding: 5px 10px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.7); /* Dark background */
    border-left: 4px solid #ff9800; /* Orange border */
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
}

/* 🔹 Timestamp Style */
.intel-timestamp {
    font-weight: bold;
    color: #03a9f4; /* Yellow */
    font-size: 12px;
    margin-right: 8px;
}

/* 🔹 System Name Style */
.intel-system {
    font-weight: bold;
    color: #ffeb3b; /* Light Blue */
    font-size: 12px;
    margin-right: 8px;
}

/* 🔹 Message Style */
.intel-message {
    color: #ffffff; /* White */
    font-size: 12px;
}

/* 🔹 Error Message */
.error-message {
    color: red;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

