/* Modern Responsive Weather App Styles */

:root {
    --primary-color: #4040c0;
    --primary-light: #c0c0ff;
    --primary-dark: #000080;
    --accent-color: #c04040;
    --accent-light: #ffc0c0;
    --accent-dark: #800000;
    --secondary-color: #40a0c0;
    --secondary-light: #d0ffff;
    --secondary-dark: #005050;
    --disabled-color: #808080;
    --disabled-bg: #c0c0c0;
    --disabled-text: #404040;
    --partial-bg: #d6d6d6; /* hours of a day outside the run, shaded in the day tab */
    --warning-color: #a08000;
    --warning-bg: #ffe0a0;
    --warning-text: #604020;
    
    --border-radius: 4px;
    --tab-min-height: 44px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: var(--spacing-md);
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.5;
}

/* Layout Grid */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
}

@media (min-width: 768px) {
    .app-container {
        grid-template-columns: 372px 1fr;
        grid-template-areas: 
            "tabs main"
            "controls main";
        grid-template-rows: auto 1fr;
        column-gap: var(--spacing-md);
    }
}

@media (max-width: 767px) {
    .app-container {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        grid-template-areas: none;
    }
    
    /* Mobile order: tabs, charts, controls */
    .tabs {
        order: 1;
        margin-bottom: var(--spacing-xs); /* Reduced spacing */
    }
    
    .main-charts {
        order: 2;
        margin-bottom: var(--spacing-xs); /* Reduced spacing */
    }
    
    .controls-panel {
        order: 3;
    }
    
    /* Compact spacing for mobile elements */
    .info-header {
        margin-bottom: 8px; /* Reduced from default */
    }
    
    .chart-wrapper {
        margin-bottom: 12px; /* Reduced from var(--spacing-lg) */
    }
    
    .chart-wrapper:last-child {
        margin-bottom: 8px; /* Small bottom margin */
    }
    
    .control-group {
        margin-bottom: 16px; /* Reduced spacing between control groups */
    }
    
    .control-group:last-child {
        margin-bottom: 0;
    }
    
    /* Reorganize tabs layout without flexbox for Firefox compatibility */
    .tabs {
        display: block;
    }
    
    .tabs #tabs-time {
        margin-bottom: 4px; /* Reduced spacing */
        display: block;
        width: 100%;
    }
    
    /* Mobile compact layout: a lower run select */
    .tabs-controls-row {
        margin-bottom: 4px;
    }

    .tabs-controls-row #select_tinit {
        height: 30px; /* Reduced height */
        -webkit-appearance: menulist;
        -moz-appearance: menulist;
        appearance: menulist;
        background: white;
        /* No vertical padding: the text fits the reduced height without being clipped */
        padding: 0 var(--spacing-sm);
        border: 1px solid #ddd;
        border-radius: var(--border-radius);
        box-sizing: border-box;
        font-size: 14px;
        line-height: normal;
    }
}

.tabs {
    grid-area: tabs;
}

.controls-panel {
    grid-area: controls;
}

.main-charts {
    grid-area: main;
}

.info-panel {
    grid-area: info;
}

/* Tabs Navigation */
.tabs {
    margin-bottom: 0;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* Model run select above the day tabs: a bold label on the left, the select only as wide as its runs
   on the right */
.tabs-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.run-label {
    flex: none;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

.tabs-controls-row #select_tinit {
    width: auto;
    min-width: 0;
    max-width: 100%;
}

.tabs-day,
.tabs-hour {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    flex: 1;
}

.tabs-day {
    margin-right: var(--spacing-md);
}


    .tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tabs-day {
        margin-right: 0;
        margin-bottom: var(--spacing-xs);
        gap: 2px;
    }
    
    .tabs-hour {
        margin-right: 0;
        margin-bottom: var(--spacing-xs);
        gap: 2px;
    }

/* Tab Styles */
.tab-day,
.tab-hour {
    /*padding: 8px 4px;*/
    cursor: pointer;
    border: 1px solid var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--border-radius);
    transition: var(--transition);
    user-select: none;
    font-size: 0.7rem;
    margin-right: 0;
    min-width: 40px;
    min-height: var(--tab-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex: 1;
}

.tab-day:hover,
.tab-hour:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.tab-day-dis,
.tab-hour-dis {
    /*padding: 8px 4px;*/
    cursor: not-allowed;
    border: 1px solid var(--disabled-bg);
    background-color: var(--disabled-bg);
    color: var(--disabled-text);
    border-radius: var(--border-radius);
    transition: var(--transition);
    user-select: none;
    font-size: 0.7rem;
    min-width: 40px;
    min-height: var(--tab-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0.6;
    flex: 1;
}

.tab-day-sel,
.tab-hour-sel {
    /*padding: 8px 4px;*/
    cursor: pointer;
    border: 1px solid var(--accent-color);
    background-color: var(--accent-light);
    color: var(--accent-dark);
    border-radius: var(--border-radius);
    transition: var(--transition);
    user-select: none;
    font-size: 0.7rem;
    min-width: 40px;
    min-height: var(--tab-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    flex: 1;
}

.tab-day-dis-sel,
.tab-hour-dis-sel {
    border-color: black;
    background-color: var(--disabled-color);
    color: black;
}

/* Day tab covering only part of the 24 hours: the missing hours are shaded from their
   side, horizontally in their ratio (--part-left / --part-right set inline per tab) */
.tab-part {
    background-image: linear-gradient(to right,
        var(--partial-bg) var(--part-left, 0%),
        transparent var(--part-left, 0%),
        transparent var(--part-right, 100%),
        var(--partial-bg) var(--part-right, 100%));
}

/* Hour tabs specific styling */
.tab-hour {
    border-color: var(--secondary-color);
    background-color: var(--secondary-light);
    color: var(--secondary-dark);
}

/* Hour tabs paged by 8 hours (runs with hourly steps), arrows around them */
.tabs-hour.paged > span {
    min-width: 32px;
}

.tabs-hour.paged > .tab-hour-nav {
    flex: 0 0 28px;
    min-width: 28px;
    font-size: 1rem;
}

/* Date styling in day tabs */
.date {
    font-weight: normal;
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: var(--spacing-xs);
}

/* Form Controls */
.control-group {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.control-group h3 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--primary-dark);
    font-size: var(--font-size-lg);
}

select,
input[type="text"],
button {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

select:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(64, 64, 192, 0.2);
}

select {
    background-color: white;
    cursor: pointer;
}

select[size] {
    height: auto;
    max-height: 300px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

@media (max-width: 767px) {
    button {
        margin-top: var(--spacing-xs);
    }
    
    .coords-input {
        margin: var(--spacing-xs) 0;
    }
    
    .coords-grid {
        margin: var(--spacing-xs) 0;
    }

    .panel-tabs {
        margin-top: var(--spacing-sm);
    }

    .search-input {
        margin: var(--spacing-xs) 0;
    }

    .sort-options {
        margin: var(--spacing-xs) 0;
    }
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

button:active {
    transform: translateY(0);
}

/* Coordinate inputs */
.coords-input {
    margin: var(--spacing-md) 0;
}

.coords-input label {
    display: block;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-xs);
}

.coords-input-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    column-gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.coords-input-header label {
    margin-bottom: 0;
}

.my-position-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    white-space: nowrap;
}

.my-position-link[aria-disabled="true"] {
    color: #888;
    cursor: progress;
    text-decoration: none;
}

.coords-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-sm);
    align-items: center;
    margin: var(--spacing-md) 0;
}

.coords-grid label {
    font-weight: 600;
    color: var(--primary-dark);
}

.map-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs) var(--spacing-md);
}

/* Panel tabs (Souřadnice / Hledat / Řazení) */
.panel-tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
    border-bottom: 1px solid var(--primary-color);
}

.panel-tabs .panel-tab {
    flex: 1;
    width: auto;
    margin: 0 0 -1px 0;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.panel-tabs .panel-tab:hover {
    background-color: #d8d8ff;
    transform: none;
    box-shadow: none;
}

.panel-tabs .panel-tab.active {
    background-color: white;
    border-bottom-color: white;
}

/* Výstup / Dostupy switch above the main chart, styled as the panel tabs */
.chart-mode-tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--primary-color);
}

.chart-mode-tabs .chart-mode-tab {
    flex: 1;
    width: auto;
    margin: 0 0 -1px 0;
    padding: 2px var(--spacing-sm);
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.chart-mode-tabs .chart-mode-tab:hover {
    background-color: #d8d8ff;
    transform: none;
    box-shadow: none;
}

.chart-mode-tabs .chart-mode-tab.active {
    background-color: white;
    border-bottom-color: white;
}

/* Inactive but clickable: without thermal data it offers the ICON-EU runs */
.chart-mode-tabs .chart-mode-tab[aria-disabled="true"] {
    opacity: 0.5;
}

.chart-mode-tabs .chart-mode-tab[aria-disabled="true"]:hover {
    background-color: var(--primary-light);
}

/* Modal dialog (native <dialog>) */
.modal {
    width: min(22rem, calc(100vw - 2rem));
    padding: 0;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.modal-body {
    padding: var(--spacing-md) var(--spacing-lg);
}

.modal-body h2 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--primary-dark);
    font-size: var(--font-size-lg);
}

.modal-body p {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-base);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

.modal-actions button {
    width: auto;
    min-width: 5rem;
    margin: 0;
    padding: var(--spacing-sm) var(--spacing-md);
}

.modal-actions .modal-cancel {
    background-color: white;
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
}

.modal-actions .modal-cancel:hover {
    background-color: var(--primary-light);
}

/* Takeoff search input */
.search-input {
    margin: var(--spacing-md) 0;
}

/* Takeoff sorting */
.sort-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs) var(--spacing-lg);
    margin: var(--spacing-md) 0;
}

.sort-options label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
}

.sort-options input[type="radio"] {
    margin: 0;
    accent-color: var(--primary-color);
}

.sort-status {
    margin: 0 0 var(--spacing-md) 0;
    font-size: 0.875rem;
    color: #555;
}

.sort-status.is-error {
    color: #b00020;
}

/* Text input with clear button inside */
.clearable-input {
    position: relative;
}

.clearable-input input[type="text"] {
    padding-right: 2rem;
}

.clearable-input .input-clear {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #888;
    font-size: 1.25rem;
    font-weight: normal;
    line-height: 1;
}

.clearable-input .input-clear:hover {
    background-color: #eee;
    color: #333;
    transform: translateY(-50%);
    box-shadow: none;
}

.clearable-input .input-clear[hidden] {
    display: none;
}

/* Info Header */
.info-header {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: #333;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Charts Container */
.charts-container {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* As wide as its chart, so the clouds / thermals switch does not stretch over the whole box */
.chart-wrapper {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.chart-wrapper:last-child {
    margin-bottom: 0;
}

/* Main canvas with the height button in its top right corner */
.chart-canvas {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}

/* Height of the chart: the other height over a bar the arrow stops at, flipped down when extended.
   Square, big enough for a finger */
.chart-canvas .btn-height {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.chart-canvas .btn-height:hover {
    background-color: var(--primary-light);
    transform: none;
}

.chart-canvas .btn-height.extended {
    flex-direction: column-reverse;
}

.btn-height-label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.btn-height-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-height.extended .btn-height-icon {
    transform: scaleY(-1);
}

/* Data source: (i) with a tooltip after the info header (nwp API) */
.data-source {
    position: relative;
    display: inline-block;
    line-height: 1;
    /* Middle aligns with half of the x-height, the shift lifts it to the middle of capitals and digits
       without raising the line */
    vertical-align: middle;
    top: -0.1em;
}

.data-source[hidden] {
    display: none;
}

.data-source .data-source-icon {
    /* A block fills the wrapper, whose middle is aligned with the text */
    display: block;
    width: 1.4em;
    height: 1.4em;
    margin: 0;
    padding: 0;
    border: 1px solid #999;
    border-radius: 50%;
    background: transparent;
    color: #666;
    font: italic bold 0.8em/1 Georgia, 'Times New Roman', serif;
    cursor: help;
}

.data-source .data-source-icon:hover,
.data-source.open .data-source-icon {
    background: #eee;
    color: #333;
    transform: none;
    box-shadow: none;
}

.data-source-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 10;
    width: max-content;
    max-width: min(18rem, 80vw);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    background: #333;
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: normal;
    line-height: 1.4;
    text-align: left;
    /* Coordinates of the takeoff and the data source on their own lines */
    white-space: pre-line;
    box-shadow: var(--shadow-md);
}

.data-source:hover .data-source-tooltip,
.data-source.open .data-source-tooltip,
.data-source-icon:focus-visible + .data-source-tooltip {
    display: block;
}


canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    background: white;
    /* Allow canvas to scale with zoom */
    image-rendering: auto;
}

/* Desktop: header aligned with day tabs row, boxes bottom-aligned */
@media (min-width: 768px) {
    .info-header {
        min-height: var(--tab-min-height);
        font-size: var(--font-size-base);
        padding-block: calc((var(--tab-min-height) - 2px - 1.3em) / 2);
        margin-bottom: var(--spacing-xs);
    }

    .main-charts,
    .controls-panel {
        display: flex;
        flex-direction: column;
    }

    .charts-container,
    .controls-panel .control-group {
        flex: 1;
    }

    .controls-panel .control-group {
        margin-bottom: 0;
    }
}

/* Sounding Chart Wrapper */
.sounding-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.sounding-wrapper img {
    max-width: 100px;
    height: auto;
}

/* Wind Direction Labels */
.wind-labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: #a0a0ff;
    margin: var(--spacing-sm) 0;
    padding: 0 var(--spacing-sm);
}

/* Wind Display Table */
.wind-display {
    margin-top: var(--spacing-md);
}

.wind-table {
    width: 100%;
    border-collapse: collapse;
}

.wind-table td {
    text-align: center;
    font-size: var(--font-size-xs);
    color: #dc3545;
    padding: var(--spacing-xs);
    vertical-align: top;
}

.wind-table img {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0 auto var(--spacing-xs) auto;
}

/* Info Panel */
.info-box {
    background: white;
    border: 1px solid #c0c0ff;
    background-color: #e0e0ff;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.info-table th {
    text-align: left;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-weight: 600;
    color: var(--primary-dark);
}

.info-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-family: monospace;
    color: #333;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    body {
        padding: var(--spacing-sm);
        /* Enable smooth zooming on touch devices */
        touch-action: manipulation;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    .control-group {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }
    
    /* The bigger font takes its height from the padding: the header stays 1.6rem high as with 0.75rem
       (2 × 0.25rem padding + 1.3 × 0.75rem line + 2px border) */
    .info-header {
        padding: calc((1.6rem - 2px - 1.3em) / 2) var(--spacing-sm);
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-xs);
    }
    
    .charts-container {
        padding: 0;
    }
    
    .chart-wrapper {
        margin-bottom: 0;
    }

    /* Without padding of the box the space under the baseline of the inline canvas was the only gap
       under the bottom chart */
    .chart-wrapper:last-child canvas {
        display: block;
    }

    .tabs {
        font-size: var(--font-size-sm);
    }
    
    /* Tab styles are now unified in base CSS */
    
    .wind-table td {
        font-size: 0.6rem;
        padding: 2px;
    }
    
    .wind-table img {
        width: 20px;
        height: 20px;
    }
    
    /* Stack wind display vertically on mobile */
    .wind-display {
        overflow-x: auto;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Focus styles for keyboard navigation */
.tab-day:focus,
.tab-hour:focus,
.btn-height:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Floating Tooltip */
.floating-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
    z-index: 1000;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: top 0.1s ease-out;
    max-width: 200px;
    white-space: nowrap;
}

.floating-tooltip.hidden {
    display: none;
}

/* The rows of the thermal tooltip are longer than the ones over the sounding: the box grows with them
   instead of letting them hang out of it, so the script can keep the whole tooltip in the window */
#thermal-tooltip {
    max-width: none;
}

/* Thermal tooltip opened by a touch: a tap on it closes it */
.floating-tooltip.tappable {
    pointer-events: auto;
    cursor: pointer;
}

.floating-tooltip .tooltip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.floating-tooltip .tooltip-row:last-child {
    margin-bottom: 0;
}

.floating-tooltip .tooltip-label {
    font-weight: 500;
    margin-right: 8px;
    color: #ccc;
}

.floating-tooltip .tooltip-value {
    color: #fff;
    font-weight: 600;
}

/* Horizontal crosshair line */
.horizontal-crosshair {
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: #ff8800;
    pointer-events: none;
    z-index: 999;
    transition: top 0.1s ease-out;
}

.horizontal-crosshair.hidden {
    display: none;
}

/* Utility classes */
.text-center { text-align: center; }
.text-small { font-size: var(--font-size-xs); }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.hidden { display: none; }
