body,
html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Main two-column layout */
.main-layout {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Content area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.navbar-title {
    flex: 1;
    text-align: center;
}

.navbar-title h1 {
    margin: 0;
    font-size: 34px;
    color: #333;
    font-weight: 600;
    letter-spacing: -0.03em;
}

/* User menu */
.user-menu {
    margin-left: 20px;
}

.button-row button {
    white-space: nowrap;
}

.maps-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Custom layouts for different numbers of visible operators */
.maps-container.single-map {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100%;
    width: 100%;
}

/* When only one map is visible, make it fill the container */
.maps-container.single-map .map-container:not(.hidden) {
    width: 100%;
    height: 100%;
    flex: 1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.maps-container.two-maps.portrait {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.maps-container.two-maps.landscape {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
}

.maps-container.three-maps.portrait {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr;
}

.maps-container.three-maps.landscape {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr 1fr;
}

/* Hide maps when they are toggled off */
.map-container.hidden {
    display: none;
}


/* Ensure single map expands properly in single-map layout */
.single-map .map-container:not(.hidden) {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.map {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.map-title {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-color: black;
    border-style: solid;
    border-radius: 4px;
    z-index: 1000;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.operator-logo {
    height: 35px;
    max-width: 100px;
    object-fit: contain;
}

.loading-indicator {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 15px;
    border-radius: 4px;
    z-index: 1000;
    font-weight: bold;
    width: 180px;
    text-align: center;
    display: none;
}

button {
    padding: 8px 15px;
    background-color: #030066;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 500;
}

/* button:hover {
    background-color: #45a049;
} */

/* #globalLoadingIndicator {
    background-color: #030066;
} */

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

select,
input {
    padding: 8px !important;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
}

.legend {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    line-height: 24px;
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

/* User menu styles */
.user-menu {
    position: relative;
    margin-left: 20px;
}

.user-icon {
    width: 40px;
    height: 40px;
    background-color: #030066;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s;
}

.user-icon:hover {
    background-color: #e88745;
}

.user-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 200px;
    display: none;
    z-index: 1001;
    border: 1px solid #e0e0e0;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-divider {
    height: 0;
    margin: 5px 0;
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
}

/* Left panel styles */
.left-panel {
    width: 280px;
    background-color: #f5f5f5;
    /* border-right: 1px solid #ddd; */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 15px;
}

.panel-logo {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 15px;
    /* border-bottom: 1px solid #ddd; */
}

.panel-logo .company-logo {
    max-width: 100%;
    height: 50px;
    object-fit: contain;
}

.panel-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #444;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Panel actions section at the bottom */
.panel-actions {
    margin-top: auto;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-bottom: 0;
}

.full-width-button {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
}

/* Stacked input rows */
.stacked-input-row {
    margin-bottom: 15px;
}

.stacked-input-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group select,
.input-group input {
    width: 100%;
    box-sizing: border-box;
}

/* Search container and controls */
.search-container {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.location-search {
    flex: 1;
    padding: 8px 12px !important;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    transition: box-shadow 0.2s;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.location-search:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 150, 83, 0.3);
    border-color: #030066;
}

.location-search::placeholder {
    color: #999;
}

.location-button {
    padding: 6px;
    height: 35px;
    width: 35px;
    min-width: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #030066;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Dropdown for search results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block !important;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item .main-text {
    font-weight: 600;
    display: block;
    color: #333;
}

.search-result-item .secondary-text {
    font-size: 12px;
    color: #666;
    display: block;
    font-weight: 400;
}

/* Operator toggles */
.operator-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.operator-toggle {
    display: flex;
    align-items: center;
}

.operator-toggle input[type="checkbox"] {
    margin-right: 10px;
}

.operator-toggle label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-logo {
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
}


/* Hexbin controls */
.hexbin-controls {
    display: flex;
    flex-direction: column;
}

.resolution-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    font-family: inherit;
}

.resolution-select:hover {
    border-color: #030066;
}

.resolution-select:focus {
    outline: none;
    border-color: #030066;
    box-shadow: 0 0 0 2px rgba(255, 150, 83, 0.2);
}

/* Orientation controls */
.orientation-controls {
    display: flex;
    gap: 20px;
}

.orientation-option {
    display: flex;
    align-items: center;
}

.orientation-option input[type="radio"] {
    margin-right: 8px;
}

.orientation-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.orientation-option svg {
    margin-right: 5px;
}

/* Disabled state for orientation controls */
.disabled-controls .orientation-option {
    opacity: 0.5;
    cursor: not-allowed;
}

.disabled-controls .orientation-option label {
    cursor: not-allowed;
}

.disabled-controls .orientation-option input[type="radio"] {
    pointer-events: none;
}

#orientationSection.disabled h4 {
    color: #999;
}

/* Sidebar toggle button */
.sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sidebar-toggle svg {
    margin-right: 5px;
}

/* Signal Strength Legend */
.signal-legend-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.signal-legend-row {
    display: flex;
    align-items: center;
}

.color-square {
    width: 16px;
    height: 16px;
    border: 1px solid #a3a0a0;
    margin-right: 3px;
    flex-shrink: 0;
}

.signal-value {
    width: 28px;
    text-align: left;
    font-size: 12px;
    flex-shrink: 0;
}

.separator {
    margin-left: 2px;
    margin-right: 4px;
    color: #666;
    font-size: 12px;
    flex-shrink: 0;
}

.unit {
    margin-left: 4px;
    font-size: 12px;
}

/* Map Controls */
.map-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-control-button {
    width: 100%;
    padding: 10px 12px;
    background-color: #030066;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.map-control-button:hover:not(:disabled) {
    background-color: #e88745;
}

.map-control-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.map-control-button svg {
    flex-shrink: 0;
}

/* Slider Control */
.slider-control {
    margin-top: 15px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.greyscale-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    opacity: 0.8;
    -webkit-appearance: none;
    appearance: none;
    transition: opacity 0.2s;
}

.greyscale-slider:hover {
    opacity: 1;
}

/* Webkit browsers */
.greyscale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #030066;
    cursor: pointer;
    transition: background-color 0.2s;
}

.greyscale-slider::-webkit-slider-thumb:hover {
    background: #e88745;
}

/* Firefox */
.greyscale-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #030066;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.greyscale-slider::-moz-range-thumb:hover {
    background: #e88745;
}

/* Track styling for Firefox */
.greyscale-slider::-moz-range-track {
    background: #ddd;
    border-radius: 3px;
    height: 6px;
}

/* Contrast slider - same styling as greyscale slider */
.contrast-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    opacity: 0.8;
    -webkit-appearance: none;
    appearance: none;
    transition: opacity 0.2s;
}

.contrast-slider:hover {
    opacity: 1;
}

/* Webkit browsers */
.contrast-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #030066;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contrast-slider::-webkit-slider-thumb:hover {
    background: #e88745;
}

/* Firefox */
.contrast-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #030066;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.contrast-slider::-moz-range-thumb:hover {
    background: #e88745;
}

/* Track styling for Firefox */
.contrast-slider::-moz-range-track {
    background: #ddd;
    border-radius: 3px;
    height: 6px;
}