:root {
    --primary-color: #2229ff;
    --secondary-color: #f3f3f3;
    --trietary-color: #00064b;
    --main-font: 'Rubik', sans-serif;
    --webcam-dock-width: min(20vw, 240px);
    --accent-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --glass-bg: rgba(0, 0, 0, 0.85);
    --glass-border: rgba(34, 41, 255, 0.2);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(34, 41, 255, 0.3);
}

html, body {
    scrollbar-width: none;
    font-family: var(--main-font);
    overscroll-behavior: none;
}

/* ========== Enhanced Loading Overlay ========== */

.loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1E1B4B 0%, #111827 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.6s ease-out;
}

.loadingContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 50%;
    padding: 40px;
    max-width: 400px;
}

#loadingIcon {
    width: 120px;
    animation: rotate 1s infinite;
}

@keyframes rotate {
    0% {
        transform: rotateX(0) rotateY(0) rotateZ(0);
    }
    33% {
        transform: rotateX(180) rotateY(0) rotateZ(0);
    }
    66% {
        transform: rotateX(180) rotateY(180) rotateZ(0);
    }
    100% {
        transform: rotateX(180) rotateY(180) rotateZ(180);
    }
}

.loadingText {
    width: 50%;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    font-family: 'Rubik', sans-serif;
}

.loadingFact {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.6;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOut 4s ease-in-out infinite;
    font-family: 'Rubik', sans-serif;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.loadingProgress {
    width: 100%;
    height: 4px;
    background: rgba(79, 70, 229, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loadingProgressBar {
    height: 100%;
    background: linear-gradient(90deg, #4F46E5, #8B5CF6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.loadingStatus {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-family: 'Rubik', sans-serif;
}

/* ========== Enhanced Search Bar ========== */

.search {
    position: relative;
    width: 300px;
    margin-right: auto;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.searchBar {
    width: 100%;
    padding: 10px 16px 10px 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.searchBar::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.searchBar:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 16px rgba(79, 70, 229, 0.3);
}

.searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.searchResultItem {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #E5E7EB;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
}

.searchResultItem:last-child {
    border-bottom: none;
}

.searchResultItem:hover {
    background: rgba(79, 70, 229, 0.2);
    color: #ffffff;
}

.searchResultItem i {
    margin-right: 12px;
    min-width: 20px;
}

/* ========== Webcam Dock ========== */

.webcamDockToggle {
    position: fixed;
    top: 10%;
    left: 19px;
    z-index: 1400;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.webcamDockToggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.4);
}

.webcamDockToggle.active {
    display: none; /* To not get in the way of the UI */
}

.webcamDock {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--webcam-dock-width);
    max-height: none;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 0;
    border-radius: 0;
    background: rgba(10, 14, 28, 0.96);
    box-shadow: none;
    backdrop-filter: blur(18px);
    z-index: 1350;
}

.webcamDock.open {
    display: flex;
}

.webcamDockHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.webcamDockTitle {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #e2e8f0;
}

.webcamDockClose {
    border: none;
    background: transparent;
    color: #f8fafc;
    cursor: pointer;
    padding: 2px;
}

.webcamDockBody {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    padding-right: 2px;
}

.webcamDockEmpty {
    font-size: 0.68rem;
    line-height: 1.3;
    color: rgba(226, 232, 240, 0.72);
    padding: 6px 2px;
}

.webcamDockItem {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.webcamDockRemove {
    position: absolute;
    top: 5px;
    right: 5px;
    border: none;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.9);
    color: white;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
}

.webcamDockItemTitle {
    font-size: 0.64rem;
    font-weight: 700;
    color: #f8fafc;
    padding-right: 22px;
    line-height: 1.2;
}

.webcamDockMediaWrap {
    width: 100%;
    min-height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webcamDockMediaWrap img,
.webcamDockMediaWrap video,
.webcamDockMediaWrap iframe {
    width: 100%;
    height: 100%;
    min-height: 72px;
    object-fit: cover;
    border: 0;
}

.webcamDockMediaWrap iframe {
    min-height: 78px;
}

.webcamDockPlaceholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #94a3b8;
    font-size: 0.68rem;
    text-align: center;
    padding: 10px 4px;
}

.webcamDockNotice {
    font-size: 0.64rem;
    color: rgba(226, 232, 240, 0.68);
    line-height: 1.3;
}

.webcamDockWarning {
    display: none;
    margin-top: 2px;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(248, 113, 113, 0.18);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
    font-size: 0.6rem;
    line-height: 1.25;
    font-weight: 700;
}

body.webcamDockOpen #map {
    left: var(--webcam-dock-width);
    width: calc(100% - var(--webcam-dock-width));
}

body.webcamDockOpen #mapContextMenu {
    left: var(--webcam-dock-width);
}

body.webcamDockOpen .top-ui,
body.webcamDockOpen .tl-ui,
body.webcamDockOpen .outlookNav {
    left: var(--webcam-dock-width);
}

body.webcamDockOpen .top-ui {
    width: calc(100% - var(--webcam-dock-width));
}

body.webcamDockOpen .productDrawer {
    left: calc(var(--webcam-dock-width) + 16px);
}

/* ========== Wind/Hail Damage Tooltips ========== */

.damageTooltip {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    border-left: 4px solid;
    border-radius: 4px;
    margin-top: 12px;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.windTooltip {
    border-left-color: #FF8C00;
}

.hailTooltip {
    border-left-color: #3B82F6;
}

.tooltipHeader {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.windTooltip .tooltipHeader {
    color: #FFB84D;
}

.hailTooltip .tooltipHeader {
    color: #60A5FA;
}

.tooltipThreat {
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.windTooltip .tooltipThreat {
    color: #FF8C00;
}

.hailTooltip .tooltipThreat {
    color: #3B82F6;
}

.tooltipDamage {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.6;
}

/* ========== Alert Modal Card Enhancements ========== */

.alertDetailCard {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alertDetailCard:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.alertDetailCard.hasDescription:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.4);
}

.alertDetailCardLabel {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 4px;
    font-weight: 600;
}

.alertDetailCardValue {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0;
}

.alertDetailCardHint {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 6px;
    font-style: italic;
}

/* ========== Scrollbar Styling ========== */

.searchResults::-webkit-scrollbar {
    width: 6px;
}

.searchResults::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.searchResults::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.3);
    border-radius: 3px;
}

.searchResults::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.5);
}

/* ========== Mobile Adjustments ========== */

@media (max-width: 768px) {
    .search {
        width: 100%;
        margin-bottom: 12px;
        margin-right: 0;
    }

    .loadingContainer {
        padding: 24px;
        max-width: 90%;
    }

    .damageTooltip {
        font-size: 11px;
        padding: 10px 12px;
    }

    .tooltipHeader {
        font-size: 12px;
    }
}

i {
    font-size: 1.3rem;
}

.button-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-left: 10px;
    border-radius: 10px;
}

.button-container:hover {
    background-color: #151350;
}

button {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    width: 120px;
    height: 45px;
    gap: 50px;
    border-radius: 10px;
    cursor: pointer;
    background-color: transparent;
    color: #f3f3f3;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.selected {
    background-color: var(--primary-color);
    display: flex;
}

.top-ui {
  position: relative;
  z-index: 1000;
  display: flex;
  color: white;
  width: min(640px, 42vw);
  height: 8vh;
  top: 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  flex-direction: row;
  align-items: center;
  justify-content: center; /* Centers the button wrappers together */
  gap: 8px; /* Even spacing between each button wrapper */
  margin: 0 auto;
  padding: 0 12px;
  animation: openUp 0.6s ease forwards;
  font-family: 'Montserrat', sans-serif;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  box-sizing: border-box;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .top-ui {
        width: min(84vw, 100%);
        height: auto;
        padding: 10px 8px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .top-ui .button-container {
        padding: 0 12px;
        height: auto;
    }
    
    .top-ui .button-container button {
        font-size: 0.85rem;
    }
}

.top-ui:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(34, 41, 255, 0.4);
}

/* 
   Style the individual wrapper divs like buttons 
   since they hold both the <i> icon and the <button> tag
*/
.top-ui .button-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 70%;
  padding: 0 18px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  flex-shrink: 0; /* Prevents containers from collapsing */
}

/* Selected state applied directly to the .button-container wrapper */
.top-ui .button-container.selected {
  background-color: #2540ff; /* Matches your active blue pill background */
}

/* Reset the inner <button> styling so it seamlessly merges with the wrapper */
.top-ui .button-container button {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
}

/* Search wrapper & inputs */
.top-ui .search {
  position: absolute; /* Keeps search out of the flex balance when hidden */
  left: 16px;
  display: flex;
  align-items: center;
}

.searchBar {
  width: 200px;
  height: 5vh;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 0 10px;
  display: none; /* Controlled by JS or CSS when ready */
}
.productDrawer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: auto;
    min-width: 300px;
    max-width: 420px;
    max-height: 52px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 14px 20px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.productDrawer .timelineContainer,
.productDrawer .toolsSection,
.productDrawer .products {
    display: none;
}

@media (max-width: 768px) {
    .productDrawer {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
        bottom: 10px;
    }
}

.productDrawer:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 41, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(34, 41, 255, 0.5);
}

.productDrawer.expanded {
    max-height: 420px;
    overflow-y: auto;
    min-width: 265px;
    padding: 18px 20px;
}

.productDrawer.expanded .timelineContainer,
.productDrawer.expanded .toolsSection,
.productDrawer.expanded .products {
    display: block;
}

.productDrawer.expanded .timelineContainer {
    display: flex;
}

.productDrawer.expanded .products {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    animation: revealContents 0.3s ease forwards;
}

.tiltDropdown {
    position: relative;
}

.tiltSelect {
    background: rgba(34, 41, 255, 0.15);
    border: 1px solid rgba(34, 41, 255, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.tiltSelect:hover {
    background: rgba(34, 41, 255, 0.25);
    border-color: rgba(34, 41, 255, 0.5);
}

.tiltSelect option {
    background: rgba(0, 0, 0, 0.95);
    color: white;
}

.toolsSection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.toolsLabel {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.toolsContainer {
    display: flex;
    gap: 8px;
}

.toolButton {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolButton:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(34, 41, 255, 0.5);
}

.toolButton.active {
    background: rgba(34, 41, 255, 0.3);
    border-color: rgba(34, 41, 255, 0.8);
}

.toolButton i {
    font-size: 1.1rem;
}

.drawControls {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.drawColorPalette {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.colorPaletteItem {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.colorPaletteItem:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.colorPaletteItem.active {
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.drawControlRow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawControlLabel {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    min-width: 60px;
}

.drawColorPicker {
    width: 40px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.drawColorPicker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.drawColorPicker::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.drawThicknessSlider {
    flex: 1;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(34, 41, 255, 0.3);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.drawThicknessSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    cursor: pointer;
}

.drawThicknessSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    cursor: pointer;
}

.drawThicknessValue {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8fa1ff;
    min-width: 30px;
    text-align: right;
}

.drawClearButton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawClearButton:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.6);
}

.drawClearButton i {
    font-size: 0.85rem;
}

.measureMarkerDot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.measureToolbar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1200;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.92);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
}

.measureToolbarLabel,
.measureToolbarToggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.measureToolbarSelect {
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.measureToolbarSelect option {
    color: #111827;
}

.measureToolbarButton {
    border: none;
    border-radius: 999px;
    padding: 7px 10px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.measureToolbarButton:hover {
    background: #1d4ed8;
}

.productDrawer::-webkit-scrollbar {
    width: 4px;
}

.productDrawer::-webkit-scrollbar-track {
    background: rgba(34, 41, 255, 0.05);
    border-radius: 4px;
}

.productDrawer::-webkit-scrollbar-thumb {
    background: rgba(34, 41, 255, 0.4);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.productDrawer::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 41, 255, 0.6);
}

.radarSiteName,
.productSelected {
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.radarTypeDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #111318;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.radarTypeDot.tdwr {
    background-color: #ffd400;
    border-color: rgba(255, 212, 0, 0.6);
    box-shadow: 0 0 6px rgba(255, 212, 0, 0.75);
}

.scanTime {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.productRow.hidden-family {
    display: none;
}

.products {
    display: none;
}

.productRow {
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(34, 41, 255, 0.15);
    border: 1px solid rgba(34, 41, 255, 0.3);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.productRow:hover {
    background: rgba(34, 41, 255, 0.35);
    border-color: rgba(34, 41, 255, 0.6);
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(34, 41, 255, 0.2);
}

.productRow.selected {
    background: var(--accent-gradient);
    border-color: #2229ff;
    box-shadow: 0 4px 12px rgba(34, 41, 255, 0.4);
    font-weight: 600;
}

.right-ui {
    z-index: 1000;
    position: absolute;
    right: 0;
}

.colortable {
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    width: 28px;
    height: 80vh;
    background-image: linear-gradient(to top, #969153, #cacdaa, #919ab4, #415b9e, #21c034, #0da212, #ffe200, #ff0000, #ffffff, #b200ff, #05ecf0, #012020);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: crosshair;
    position: relative;
}

.colortable-tooltip {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.colortable:hover .colortable-tooltip {
    opacity: 1;
}

.alertPropertyChart {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 6px;
    position: relative;
    overflow: hidden;
}

.alertPropertyChartBar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.alertPropertyChartLabel {
    display: flex;
    position: relative;
    right: -36px;
    height: 100%;
    /* top: 13%; */
    /* transform: translateY(-50%); */
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    align-items: center;
}

.tickMarks {
    color: white;
    position: absolute;
    right: 55px;
    top: 10px;
    height: 81vh;
    row-gap: 1px;
    display: flex;
    justify-content: space-between;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    flex-direction: column-reverse;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-size: 0.75rem;
    pointer-events: none;
}

.colortable:hover {
    box-shadow: 0 0 20px rgba(34, 41, 255, 0.5);
    border-color: rgba(34, 41, 255, 0.6);
}

/* ----------------------- Top-right options menu ----------------------- */

.menuWrapper {
    position: fixed;
    top: 10px;
    right: 15px;
    z-index: 1100;
}

.menuButton {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: #f3f3f3;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.menuButton:hover {
    background: rgba(34, 41, 255, 0.3);
    border-color: rgba(34, 41, 255, 0.5);
    box-shadow: var(--shadow-glow);
}

.menuDropdown {
    position: absolute;
    top: 55px;
    right: 0;
    width: 220px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 6px;
}

.menuDropdown.open {
    display: flex;
}

.menuItem {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    background: rgba(34, 41, 255, 0.15);
    transition: all 0.2s ease;
}

.menuItem:hover {
    background: rgba(34, 41, 255, 0.35);
    border-color: rgba(34, 41, 255, 0.5);
}

.menuItem span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Alerts list inside the menu */
.alertsList {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 2px;
}

.alertsEmpty {
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    padding: 8px;
}

.alertsItem {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
}

.alertsItem:hover {
    background: rgba(34,41,255,0.22);
}

.alertsItemTitle {
    font-weight: 700;
    font-size: 0.9rem;
}

.alertsItemSummary {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.75);
}

/* Mobile adjustments for the top-right menu */
@media (max-width: 640px) {
    .menuDropdown {
        right: 8px;
        width: calc(100vw - 32px);
        top: 56px;
    }
    .menuButton {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }
    .menuWrapper {
        top: 8px;
        right: 8px;
    }
    .top-ui {
        width: 94%;
        left: 3%;
        right: 3%;
    }
}

.menuItem i {
    font-size: 0.9rem;
}

.menuDivider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 2px;
}

.toggleSwitch {
    width: 34px;
    height: 18px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.25);
    position: relative;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.toggleSwitch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: white;
    transition: transform 0.2s ease;
}

.menuItem.active .toggleSwitch {
    background-color: var(--primary-color);
}

.menuItem.active .toggleSwitch::after {
    transform: translateX(16px);
}

/* ----------------------- Settings panel ----------------------- */

.settingsDropdown {
    position: absolute;
    top: 55px;
    right: 0;
    width: 260px;
    max-height: 80vh;
    overflow-y: auto;
    background: linear-gradient(135deg, var(--trietary-color) 0%, #000d5c 100%);
    border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    padding: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(34, 41, 255, 0.3);
    display: none;
    flex-direction: column;
    gap: 16px;
    z-index: 1101;
}

.settingsDropdown.open {
    display: flex;
}

/* ----------------------- Settings Modal ----------------------- */

#settingsModalContainer {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    padding: 20px;
}

#settingsModalContainer[style*="flex"] {
    display: flex !important;
}

.settingsModal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    max-width: 450px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.settingsModalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.settingsModalTitle {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settingsModalClose {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settingsModalClose:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: rotate(90deg);
}

.settingsModalBody {
    padding: 0;
}

.settingSection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: 14px;
    margin: 18px 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.settingSection:first-child {
    margin-top: 20px;
}

.settingSection:last-child {
    margin-bottom: 20px;
}

.settingLabel {
    display: block;
    color: #f3f7ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.25px;
}

.settingInput {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(79, 209, 255, 0.32);
    background: rgba(8, 12, 28, 0.9);
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.settingInput:focus {
    border-color: rgba(79, 209, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(79, 209, 255, 0.18);
    transform: translateY(-1px);
}

.settingInput[type="range"] {
    padding: 0;
    background: transparent;
    accent-color: #4fd1ff;
    border: none;
    box-shadow: none;
}

.settingInput select,
.settingInput option {
    color: #fff;
}

/* ----------------------- Settings Tabs ----------------------- */

.settingsTabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.settingsTab {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--main-font);
}

.settingsTab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.settingsTab.active {
    color: #fff;
    border-bottom-color: var(--primary-color);
    background: rgba(34, 41, 255, 0.1);
}

.settingsTabContent {
    display: none;
    padding: 8px 0 20px;
}

.settingsTabContent.active {
    display: block;
}

.settingsModal .settingsTabContent .settingSection {
    margin: 14px 20px;
}

.settingsSection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settingsSection + .settingsSection {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.settingsSectionTitle {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8ea0c9;
}

.settingsSelect {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0 32px 0 10px;
    background-color: rgba(255, 255, 255, 0.08);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0L5 6L10 0Z' fill='%238ea0c9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: #fff;
    font-family: var(--main-font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    background: black;
}

.settingsRangeRow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settingsRange {
    flex: 1;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(34, 41, 255, 0.3);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.settingsRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    cursor: pointer;
}

.settingsRange::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    cursor: pointer;
}

.settingsRangeValue {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8fa1ff;
    min-width: 38px;
    text-align: right;
}

.settingsColorGrid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settingsColorItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
    color: #d9e2f5;
    gap: 10px;
}

.settingsColorItem input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    background: none;
    cursor: pointer;
    padding: 0;
}

.settingsColorItem input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.settingsColorItem input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

/* ----------------------- Outlooks nav ----------------------- */

.outlookNav {
    position: absolute;
    top: 15px;
    right: 70px;
    z-index: 1050;
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--trietary-color) 0%, #000d5c 100%);
    border-radius: 14px;
    padding: 10px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(34, 41, 255, 0.3);
}

.outlookNavIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(34, 41, 255, 0.25);
    color: #8fa1ff;
}

.outlookNavIcon i {
    font-size: 0.95rem;
}

.outlookSelectWrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 240px;
}

.outlookSelectLabel {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8ea0c9;
}

.outlookSelect {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0 32px 0 10px;
    background-color: rgba(255, 255, 255, 0.08);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0L5 6L10 0Z' fill='%238ea0c9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: #fff;
    font-family: var(--main-font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.outlookSelect:hover {
    border-color: rgba(34, 41, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.12);
}

.outlookSelect:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 41, 255, 0.25);
}

.outlookSelect option {
    color: #111;
    font-weight: 500;
}

.outlookSelect optgroup {
    color: var(--primary-color);
    font-weight: 700;
    font-style: normal;
    background-color: #f3f3f3;
}

.outlookPanel {
    position: absolute;
    top: 15%;
    right: 70px;
    z-index: 1048;
    width: 280px;
    max-height: 320px;
    overflow: auto;
    background: rgba(10, 16, 28, 0.95);
    border: 1px solid rgba(79, 209, 255, 0.25);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.outlookPanelTitle {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4fd1ff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.outlookCityList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.outlookCityItem {
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.outlookCityName {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

a.outlookCityName::after {
    content: '\f35d'; /* fa-up-right-from-square */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: #4fd1ff;
    opacity: 0.75;
}

.outlookCityName:hover {
    color: #4fd1ff;
    text-decoration: underline;
}

.outlookCityMeta {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #9eb4c8;
    line-height: 1.35;
}

.outlookCityItem.state-loading .outlookCityName,
.outlookCityItem.state-empty .outlookCityName,
.outlookCityItem.state-error .outlookCityName {
    color: #9eb4c8;
    font-weight: 500;
}

.outlookCityItem.state-error .outlookCityName {
    color: #ff8080;
}

.tl-ui {
    position: absolute;
    top: 16px;
    left: 16px;
    min-width: 260px;
    max-width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    user-select: none;
    font-family: var(--main-font);
  }
 
  .tl-ui-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white;
  }
 
  .tl-ui-header:hover {
    background: rgba(34, 41, 255, 0.15);
  }

  .tl-ui-title {
    flex: 1;
  }

  .tl-ui-layers-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(79, 209, 255, 0.3);
    background: rgba(79, 209, 255, 0.12);
    color: #4fd1ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .tl-ui-layers-btn i {
    font-size: 0.85rem;
  }

  .tl-ui-layers-btn:hover {
    background: rgba(79, 209, 255, 0.28);
    border-color: rgba(79, 209, 255, 0.5);
    box-shadow: 0 0 12px rgba(79, 209, 255, 0.3);
  }

  /* Row housing the "Map Layers" hamburger button, now living underneath
     the Settings/Info panel content instead of inside its collapsible
     header. Always visible, regardless of whether the panel is expanded. */
  .tl-ui-layers-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .tl-ui-layers-row:hover {
    background: rgba(34, 41, 255, 0.15);
  }

  .tl-ui-layers-text {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.2px;
  }
 
  .tl-ui-arrow {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-right: 2px solid #4fd1ff;
    border-bottom: 2px solid #4fd1ff;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
  }

  .layersDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: 240px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    max-height: 70vh;
    overflow-y: auto;
  }

  .layersDropdown.open {
    display: flex;
  }
 
  .tl-ui.open .tl-ui-arrow {
    transform: rotate(-135deg);
  }
 
  .tl-ui-dropdown {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    border-top: 1px solid transparent;
  }
 
  .tl-ui.open .tl-ui-dropdown {
    max-height: 240px;
    opacity: 1;
    border-top: 1px solid #1f2d3a;
    animation: dropdownReveal 0.3s ease;
  }
 
  .tl-ui-option {
    padding: 11px 16px;
    font-size: 14px;
    color: #c7d6e2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
 
  .tl-ui-option:hover {
    background: #1c2836;
    color: #4fd1ff;
  }


  /* Radar Message Modal */

  .modal-container {
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 27%);
    z-index: 10000;
    position: absolute;
    margin: 0 auto;
    top: 0;
    align-items: center;
  }

  #msgModal {
    display: flex;
    width: 50%;
    height: 50%;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
  }
/* ----------------------- Timeline / Frame playback ----------------------- */

.timelineContainer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.timelineContainer.hidden {
    display: none;
}

.timelineLabel {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.85;
}

.timelineSlider {
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(34, 41, 255, 0.3);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.timelineSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    cursor: pointer;
}

.timelineSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    cursor: pointer;
}

.timelineTicks {
    position: relative;
    height: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    opacity: 0.7;
}

.timelineProgress {
    width: 100%;
    height: 4px;
    background: rgba(34, 41, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4px;
}

.timelineProgressBar {
    height: 100%;
    background: linear-gradient(90deg, #1e40af, #3b82f6);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.timelineProgressText {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 2px;
}

/* ----------------------- Alert Popup ----------------------- */

.mapboxgl-popup-content {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 12px;
}

.alertMapboxPopup .mapboxgl-popup-close-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    top: 8px;
    right: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1;
}

.alertMapboxPopup .mapboxgl-popup-close-button:hover {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

.mapboxgl-popup-close-button {
    display: none;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
    border-top-color: #000;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
    border-bottom-color: #000;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: #000;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: #000;
}

.alertPopup {
    display: flex;
    align-items: stretch;
    font-family: var(--main-font);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    min-width: 260px;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
}

.alertPopupBar {
    width: 6px;
    flex-shrink: 0;
}

.alertPopupBody {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.alertPopupHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 10px 14px;
}

.alertPopupTitle {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.alertPopupLocation {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.alertPopupInfo {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: rgba(62, 162, 255, 0.15);
    color: #3ea2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.alertPopupInfo i {
    font-size: 12px;
}

.alertPopupBanner {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.alertPopupDetails {
    padding: 12px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alertPopupRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.alertPopupLabel {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

.alertPopupValue {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-align: right;
}

/* ----------------------- Lightning Popup ----------------------- */

.lightningPopup {
    display: flex;
    flex-direction: column;
    font-family: var(--main-font);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.lightningPopupHeader {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: rgba(34, 41, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lightningPopupBody {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lightningPopupRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.lightningPopupLabel {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

.lightningPopupValue {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-align: right;
}

/* ----------------------- Outlook Popup ----------------------- */

.outlookMapboxPopup .mapboxgl-popup-close-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    top: 8px;
    right: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1;
}

.outlookMapboxPopup .mapboxgl-popup-close-button:hover {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

.outlookPopup {
    display: flex;
    align-items: stretch;
    font-family: var(--main-font);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    min-width: 220px;
    max-width: 280px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.outlookPopupBar {
    width: 6px;
    flex-shrink: 0;
}

.outlookPopupBody {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 26px 14px 14px;
    min-width: 0;
}

.outlookPopupTitle {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.outlookPopupRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.outlookPopupLabel {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

.outlookPopupValue {
    font-size: 12.5px;
    font-weight: 800;
    color: #fff;
    text-align: right;
}

/* ----------------------- Improved UI Responsiveness ----------------------- */

/* Smooth button press effect */
button:active {
    transform: scale(0.97);
}

/* Improved focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(34, 41, 255, 0.6);
    outline-offset: 2px;
}

/* Smooth card hover lift effect */
.alertDetailCard,
.menuItem,
.locationSearchResultItem {
    transform: translateY(0);
}

.alertDetailCard:hover,
.menuItem:hover,
.locationSearchResultItem:hover {
    transform: translateY(-2px);
}

/* Improved modal animation */
.modal-content,
.settingsModal,
.alertModal,
.locationsModal {
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Smooth loading bar animation */
.loadingBar {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Improved tooltip animation */
#colortableTooltip,
#sparkline-tooltip {
    animation: tooltipFadeIn 0.15s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth colorbar transition */
#colortable {
    transition: background 0.3s ease;
}

/* Improved toggle switch animation */
.toggleSwitch {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

/* Better scrollbar styling for all scrollable elements */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Smooth dropdown animation */
.layersDropdown,
.tl-ui-dropdown {
    animation: dropdownSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alertModal {
    width: 850px;
    max-width: 94vw;
    max-height: 80vh;
    margin: 10vh auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    font-family: var(--main-font);
}

.alertModalHeader {
    position: relative;
    padding: 20px 44px 18px 20px;
}

.alertModalTitle {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin-bottom: 12px;
}

.alertModalChips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alertModalChip {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 8px;
    position: relative;
}

.alertModalChip[data-is-source="true"] {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.alertModalChip[data-is-source="true"]:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chipLabel {
    display: flex;
    align-items: center;
    gap: 4px;
}

.alertModalChip[data-is-source="true"] .chipLabel::after {
    content: '?';
    font-size: 0.6rem;
    opacity: 0.7;
    margin-left: 2px;
}

.alertModalClose {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.alertModalClose:hover {
    background: rgba(0, 0, 0, 0.45);
}

.alertModalBody {
    background: rgba(0, 0, 0, 0.8);
    color: #dfe3e8;
    padding: 18px 20px 22px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    overflow-y: auto;
    flex: 1;
}

.alertModalBody::-webkit-scrollbar {
    width: 6px;
}

.alertModalBody::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.alertModalDetails {
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    padding: 12px 14px;
    border-radius: 6px;
}

.detailRow {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.78rem;
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detailRow:last-child {
    border-bottom: none;
}

.detailLabel {
    font-weight: 600;
    color: #b0b8c1;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.detailValue {
    color: #dfe3e8;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.alertBulletinText {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.55;
}

.sourceTooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #dfe3e8;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    z-index: 1000;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    font-family: var(--main-font);
}

.sourceExplanationSection {
    margin: 0;
    padding: 0;
}

.sourceExplanationTitle {
    font-weight: 700;
    color: #fff;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
    display: block;
}

.sourceExplanationText {
    color: #b0b8c1;
    font-size: 0.73rem;
    line-height: 1.45;
}

.sourceTooltip a {
    color: #64b5f6;
    text-decoration: none;
    border-bottom: 1px solid rgba(100, 181, 246, 0.5);
    transition: color 0.2s ease;
}

.sourceTooltip a:hover {
    color: #90caf9;
    border-bottom-color: #90caf9;
}

/* ----- Animations ----- */

 @keyframes dropdownReveal {
    from {
      transform: translateY(-8px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes bounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1)
    }
}

@keyframes openUp {
    from {
        width: 0%;
    }
    to {
        width: 50%;
    }
}

@keyframes revealContents {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes borderGradient {
    0% {
        border-color: #ffffff;
    }
    5% {
        border-color: #ff0000;
    }
    20% {
        border-color: #00ff08;
    }
    40% {
        border-color: #22412d;
    }
    60% {
        border-color: #c5ccf0;
    }
    80% {
        border-color: #ff00d9;
    }
    95% {
        border-color: #820606;
    }
    100% {
        border-color: #ffffff;
    }
}

/* =====================================================================
   Map Context Menu (right-click / double-tap)
   ===================================================================== */

.mapContextMenu {
    position: absolute;
    z-index: 1500;
    display: none;
    flex-direction: column;
    min-width: 200px;
    max-width: 260px;
    background: linear-gradient(180deg, rgba(0, 6, 75, 0.97) 0%, rgba(0, 0, 0, 0.95) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px;
    font-family: var(--main-font);
    color: #fff;
    animation: contextMenuPop 0.15s ease-out;
    user-select: none;
}

@keyframes contextMenuPop {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mapContextMenuRadars {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 2px;
}

.mapContextRadarBadge {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(34, 41, 255, 0.18);
    border: 1px solid rgba(34, 41, 255, 0.3);
    border-radius: 9px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 9px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mapContextRadarBadge i {
    font-size: 0.75rem;
}

.mapContextRadarBadge:hover {
    background: rgba(34, 41, 255, 0.4);
    border-color: rgba(34, 41, 255, 0.7);
    transform: translateY(-1px);
}

.mapContextMenuDivider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 4px;
}

.mapContextMenuDivider.vertical {
    width: 1px;
    height: auto;
    margin: 4px 6px;
    align-self: stretch;
}

.mapContextMenuCoords {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.2px;
}

.mapContextMenuCoords i {
    font-size: 0.7rem;
    color: #4fd1ff;
}

.mapContextMenuItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mapContextMenuItem i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    color: #8fa1ff;
}

.mapContextMenuItem:hover {
    background: rgba(34, 41, 255, 0.25);
}

/* =====================================================================
   My Locations Modal
   ===================================================================== */

.locationsModal {
    max-width: 480px;
}

.locationsModalBody {
    padding: 22px 26px 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.locationsSearchRow {
    display: flex;
    gap: 8px;
}

.locationSearchInput,
.locationNameInput {
    flex: 1;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--main-font);
    font-size: 0.88rem;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.locationSearchInput::placeholder,
.locationNameInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.locationSearchInput:focus,
.locationNameInput:focus {
    border-color: var(--primary-color);
    background: rgba(34, 41, 255, 0.1);
}

.locationSearchButton {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid rgba(34, 41, 255, 0.4);
    background: rgba(34, 41, 255, 0.25);
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.locationSearchButton:hover {
    background: rgba(34, 41, 255, 0.45);
}

.locationSearchResults {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
}

.locationSearchResultItem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: #d9e2f5;
    cursor: pointer;
    transition: background 0.15s ease;
}

.locationSearchResultItem:hover {
    background: rgba(34, 41, 255, 0.25);
}

.locationSearchResultItem i {
    font-size: 0.75rem;
    color: #4fd1ff;
    flex-shrink: 0;
}

.locationSearchResultItem.state-loading,
.locationSearchResultItem.state-empty,
.locationSearchResultItem.state-error {
    cursor: default;
    color: rgba(255, 255, 255, 0.55);
}

.locationSearchResultItem.state-error {
    color: #ff8080;
}

.locationPickOnMapButton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px dashed rgba(79, 209, 255, 0.4);
    background: rgba(79, 209, 255, 0.08);
    color: #4fd1ff;
    font-family: var(--main-font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.locationPickOnMapButton:hover,
.locationPickOnMapButton.active {
    background: rgba(79, 209, 255, 0.2);
    border-color: rgba(79, 209, 255, 0.7);
}

.locationIconPicker {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(34, 41, 255, 0.08);
    border: 1px solid rgba(34, 41, 255, 0.2);
}

.locationIconPickerLabel {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8ea0c9;
}

.locationIconGrid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.locationIconOption {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: all 0.15s ease;
}

.locationIconOption:hover {
    background: rgba(34, 41, 255, 0.25);
}

.locationIconOption.selected {
    background: var(--accent-gradient);
    border-color: #2229ff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 41, 255, 0.4);
}

.locationSaveButton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    font-family: var(--main-font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.locationSaveButton:hover {
    filter: brightness(1.1);
}

.locationsListTitle {
    margin-top: 4px;
}

.locationsList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.locationListItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.locationListItem.state-empty {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    justify-content: flex-start;
}

.locationListItemMain {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    min-width: 0;
}

.locationListItemMain span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.locationListItemMain i {
    color: #4fd1ff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.locationListItemActions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.locationGoButton,
.locationDeleteButton {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.locationGoButton:hover {
    background: rgba(34, 41, 255, 0.3);
    color: #fff;
}

.locationDeleteButton:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* Scrollbars for the new modal's scrollable sections, matching the
   productDrawer's thin blue scrollbar treatment. */
.locationSearchResults::-webkit-scrollbar,
.locationsList::-webkit-scrollbar {
    width: 4px;
}

.locationSearchResults::-webkit-scrollbar-thumb,
.locationsList::-webkit-scrollbar-thumb {
    background: rgba(34, 41, 255, 0.4);
    border-radius: 4px;
}

/* =====================================================================
   Responsive / Mobile layout
   ===================================================================== */

@media (max-width: 900px) {
    .top-ui {
        width: 92%;
        height: auto;
        min-height: 56px;
        padding: 4px 0px;
        left: 69px;
    }

    .top-ui button {
        width: auto;
        min-width: 0;
        padding: 0 14px;
        font-size: 1rem;
    }

    .tl-ui,
    .layersMenuWrapper {
        max-width: calc(100vw - 32px);
    }

    .outlookNav {
        left: 16px;
        right: 16px;
        width: auto;
    }

    .outlookSelectWrap {
        min-width: 0;
        flex: 1;
    }

    .outlookPanel {
        left: 16px;
        right: 16px;
        width: auto;
    }
    /* On small screens hide the outlook list panel completely to save space */
    .outlookPanel {
        display: none !important;
    }

    .right-ui {
        transform: scale(0.85);
        transform-origin: top right;
    }

    .outlookPanel {
        display: none;
    }
}

@media (max-width: 640px) {
    .top-ui {
        position: fixed;
        top: 40px;
        left: 50%;
        transform: translateX(-94%);
        /* width: calc(100vw - 20px); */
        width: 94%;
        flex-wrap: wrap;
        height: auto;
        padding: 20px 20px;
        gap: 6px;
        justify-content: space-between;
        z-index: 1200;
        flex-direction: column;
    }

    .top-ui .search {
        flex: 1 1 100%;
        min-width: 220px;
    }

    .top-ui .button-container {
        flex: 1 1 auto;
        min-width: 90px;
        padding: 8px 10px;
    }

    .top-ui button {
        font-size: 0.85rem;
        height: 36px;
        padding: 0 10px;
    }

    i {
        font-size: 1rem;
    }

    .tl-ui {
        position: fixed;
        top: calc(8px + 56px + 8px);
        left: 10px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: none;
        margin: 0 auto;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .productDrawer {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 12px;
        width: calc(100vw - 20px);
        max-width: none;
        min-width: 0;
        max-height: 36vh;
        overflow: hidden;
        border-radius: 16px;
        box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
        font-size: 0.85rem;
        box-sizing: border-box;
    }

    .productDrawer.expanded {
        bottom: 0;
        max-height: calc(100vh - 250px);
        overflow-y: auto;
        padding-bottom: 16px;
        z-index: 9999;
    }

    .productDrawer .toolsSection,
    .productDrawer .timelineContainer,
    .productDrawer .products {
        width: 100%;
    }

    .productDrawer .toolsSection {
        display: none;
    }

    .productDrawer.expanded .toolsSection {
        display: block;
    }

    .productDrawer .timelineContainer {
        margin-top: 8px;
    }

    .productDrawer .toolsContainer {
        gap: 8px;
        flex-wrap: wrap;
        flex-direction: row;
    }

    .productDrawer .toolButton {
        flex: 1 1 45%;
    }

    .tl-ui {
        display: none;
    }

    .menuWrapper {
        position: fixed;
        top: calc(8px + 56px + 8px);
        right: 12px;
        z-index: 1300;
    }

    .menuDropdown {
        width: min(240px, calc(100vw - 24px));
        right: 0;
        left: auto;
    }

    .outlookNav {
        position: fixed;
        top: calc(8px + 56px + 8px + 64px);
        left: 10px;
        right: 10px;
        width: calc(100vw - 20px);
        flex-wrap: wrap;
        padding: 10px 12px;
        border-radius: 16px;
        z-index: 1200;
    }

    .outlookPanel {
        left: 10px;
        right: 10px;
        top: auto;
        bottom: calc(12px + 36vh + 12px);
        max-height: 30vh;
        width: calc(100vw - 20px);
        border-radius: 16px;
    }

    .webcamDockToggle {
        top: auto;
        bottom: 22px;
        left: auto;
        right: 12px;
    }

    .webcamDock {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 38vh;
        max-height: 45vh;
        border-radius: 16px 16px 0 0;
        background: rgba(10, 14, 28, 0.98);
        box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.35);
    }

    .top-ui .button-container button {
        display: none;
    }

    .top-ui .button-container {
        flex: 0 0 auto;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 14px;
        justify-content: center;
    }

    .top-ui .button-container i {
        font-size: 1.2rem;
    }

    .top-ui .search {
        left: 10px;
        width: 44px;
    }

    .top-ui .search-icon {
        width: 44px;
        height: 44px;
        display: none;
        align-items: center;
        justify-content: center;
    }

    .searchBar {
        display: none !important;
        width: 0 !important;
        opacity: 0;
        visibility: hidden;
    }

    .webcamDockToggle,
    .webcamDock,
    .webcamDock.open {
        display: none !important;
    }

    .productBanner {
        display: none !important;
    }

    body.webcamDockOpen #map {
        left: 0;
        width: 100%;
    }

    body.webcamDockOpen .top-ui,
    body.webcamDockOpen .tl-ui,
    body.webcamDockOpen .outlookNav {
        left: 0;
        width: 100%;
    }

    body.webcamDockOpen .productDrawer {
        left: 10px;
        right: 10px;
        bottom: calc(38vh + 16px);
        width: calc(100vw - 20px);
    }

    .right-ui {
        display: none;
    }

    .settingsModal,
    .locationsModal,
    .alertModal {
        max-width: 94vw;
        margin: 0 auto;
        overflow: hidden;
    }

    .mapContextMenu {
        min-width: 170px;
        max-width: 220px;
    }

    .locationIconGrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 420px) {
    .top-ui button span,
    .top-ui button {
        font-size: 0.78rem;
    }

    .productDrawer {
        padding: 12px 14px;
    }

    .toolsContainer {
        flex-direction: column;
    }
}

/* Product banner animated top border variables */
:root {
    /* default (original) product banner gradient - preserved for fallback */
    --product-banner-default-border-gradient: linear-gradient(90deg, #64b5f6, #7c9dff, #4fd1ff);
    --product-banner-border-gradient: var(--product-banner-default-border-gradient);
    --product-banner-border-size: 2px;
    --product-banner-border-animation: 6s linear infinite;
}

.productBanner {
    position: absolute;
    top: 16px;
    left: 96px; /* anchor left edge further right to avoid overlapping the layers menu */
    transform: translateY(-12px);
    z-index: 950;
    display: flex;
    align-items: stretch;
    gap: 0;
    font-family: var(--main-font);
    background: linear-gradient(180deg, rgba(6, 10, 26, 0.92) 0%, rgba(0, 0, 0, 0.92) 100%);
    border: 1px solid var(--glass-border);
    border-top-color: transparent; /* top border will be rendered by the animated pseudo-element */
    border-radius: 10px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: visible; /* allow expansion to the right */
    min-width: 380px;
    width: auto;
    max-width: calc(100% - 112px);
}

.productBanner::before {
    content: "";
    position: absolute;
    top: -1px; /* overlap the element's top border so the gradient replaces it visually */
    left: 0;
    right: 0;
    height: calc(var(--product-banner-border-size) + 1px);
    background: var(--product-banner-border-gradient);
    background-size: 200% 100%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    z-index: 951;
    pointer-events: none;
    animation: productBannerBorderShift var(--product-banner-border-animation);
    transition: background 0.35s ease, filter 0.35s ease;
}

.productBanner.alert-priority-flash::before {
    filter: saturate(1.35) brightness(1.12);
    animation-duration: 1.1s;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

@keyframes productBannerBorderShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
 
.productBanner.visible {
    opacity: 1;
    transform: translateY(0);
    margin-left: 14vw;
    pointer-events: auto;
}

.dockFullscreenBanner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translate(-50%, -12px);
    z-index: 1750;
    display: flex;
    align-items: stretch;
    gap: 0;
    font-family: var(--main-font);
    background: linear-gradient(180deg, rgba(6, 10, 26, 0.94) 0%, rgba(0, 0, 0, 0.94) 100%);
    border: 1px solid var(--glass-border);
    border-top-color: transparent;
    border-radius: 10px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    min-width: 360px;
    max-width: min(92vw, 760px);
    overflow: visible;
}

.dockFullscreenBanner::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: calc(var(--product-banner-border-size) + 1px);
    background: var(--product-banner-border-gradient);
    background-size: 200% 100%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    z-index: 1751;
    pointer-events: none;
    animation: productBannerBorderShift var(--product-banner-border-animation);
}

.dockFullscreenBanner.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dockFullscreenBannerMain {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 18px;
    min-width: 0;
}

.dockFullscreenBannerTitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.15;
    white-space: nowrap;
}

.dockFullscreenBannerSubtitle {
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7c9dff;
}

.dockFullscreenBannerDivider {
    width: 1px;
    flex-shrink: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(124, 157, 255, 0.5) 20%, rgba(124, 157, 255, 0.5) 80%, transparent 100%);
}

.dockFullscreenBannerTimeWrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 18px;
    min-width: 0;
}

.dockFullscreenBannerClock {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffffff;
    white-space: nowrap;
}

.dockFullscreenBannerDate {
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}
 
/* Placed below the top-ui pill by default; media query below repositions
   it for narrow/mobile layouts so it doesn't collide with the search bar. */
@media (min-width: 901px) {
    .productBanner {
        top: 88px;
    }
}
 
.productBannerMain {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 18px;
    min-width: 0;
}
 
.productBannerTitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.15;
    white-space: nowrap; /* keep single-line title and let the banner grow */
    overflow: visible;
    text-overflow: clip;
    max-width: none;
}
 
.productBannerSubtitle {
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7c9dff;
}
 
.productBanner.outlookVariant .productBannerSubtitle {
    color: #4fd1ff;
}
 
.productBannerDivider {
    width: 1px;
    flex-shrink: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(124, 157, 255, 0.5) 20%, rgba(124, 157, 255, 0.5) 80%, transparent 100%);
}
 
.productBannerTimeWrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 18px;
    min-width: 0;
}
 
.productBannerClock {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffffff;
    white-space: nowrap;
}
 
.productBannerDate {
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}
 
/* ----------------------- Mobile ----------------------- */
 
@media (max-width: 900px) {
    .dockFullscreenBanner {
        top: 12px;
        left: 50%;
        right: auto;
        min-width: 0;
        width: min(92vw, 540px);
        max-width: min(92vw, 540px);
    }

    .productBanner {
        top: auto;
        bottom: 78px;
        left: 12px;
        right: 12px;
        transform: translateY(12px);
        min-width: 0;
        width: auto;
    }
 
    .productBanner.visible {
        transform: translateY(0);
    }
 
    .productBannerMain,
    .productBannerTimeWrap {
        padding: 8px 12px;
    }
 
    .productBannerTitle {
        font-size: 0.9rem;
        max-width: 46vw;
    }
 
    .productBannerSubtitle {
        font-size: 0.65rem;
    }
 
    .productBannerClock {
        font-size: 0.82rem;
    }
 
    .productBannerDate {
        font-size: 0.65rem;
    }
}
 
@media (max-width: 420px) {
    .productBannerMain,
    .productBannerTimeWrap {
        padding: 7px 10px;
    }
 
    .productBannerTitle {
        max-width: 38vw;
    }
}
