









.scale-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.scale-bar {
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.scale-segment {
    position: absolute;
    height: 100%;
    top: 0;
}

.scale-segment.short { background: #ff5252; }
.scale-segment.fire { background: #ff9800; }
.scale-segment.attention { background: #ffeb3b; }
.scale-segment.norm { background: #4caf50; }
.scale-segment.break { background: #ff9100; }

.scale-labels {
    position: relative;
    height: 20px;
    margin-top: 5px;
}

.scale-labels span {
    position: absolute;
    font-size: 12px;
    transform: translateX(-50%);
    white-space: nowrap;
}




.status-kz { background-color: #ff5252; color: white; }
.status-fire { background-color: #ff9800; color: white; }
.status-attention { background-color: #ffeb3b; }
.status-norm { background-color: #4caf50; color: white; }
.status-break { background-color: #ff9100; color: white; }


.zoom-controls button {
    padding: 5px 10px;
    margin: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.zoom-controls button:hover {
    background: #f0f0f0;
}


.sensor-hover {
    filter: drop-shadow(0 0 5px rgba(0, 150, 255, 0.7));
    transition: filter 0.2s ease;
}






/* Обновленный файл status-scale.css */
.scale-container {
    position: relative;
    width: 100%;
    margin: 30px 0;
    padding: 10px 0;
}

.scale-bar {
    height: 30px;
    background: linear-gradient(to bottom, #f8f8f8, #e0e0e0);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 3px rgba(0,0,0,0.2),
        0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #d0d0d0;
}

.scale-segment {
    position: absolute;
    height: 100%;
    top: 0;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.3);
}

.scale-segment::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0));
}

.scale-segment.short { 
    background: linear-gradient(to bottom, #ff6b6b, #ff5252);
    border-left: 2px solid #ff8a8a;
    border-right: 2px solid #e53935;
}

.scale-segment.fire { 
    background: linear-gradient(to bottom, #ffb74d, #ff9800);
    border-left: 2px solid #ffcc80;
    border-right: 2px solid #f57c00;
}

.scale-segment.attention { 
    background: linear-gradient(to bottom, #fff176, #ffeb3b);
    border-left: 2px solid #fff59d;
    border-right: 2px solid #fbc02d;
}

.scale-segment.norm { 
    background: linear-gradient(to bottom, #81c784, #4caf50);
    border-left: 2px solid #a5d6a7;
    border-right: 2px solid #388e3c;
}

.scale-segment.break { 
    background: linear-gradient(to bottom, #ffb74d, #ff9100);
    border-left: 2px solid #ffcc80;
    border-right: 2px solid #f57c00;
}

.scale-labels {
    position: relative;
    height: 25px;
    margin-top: 8px;
}

.scale-labels span {
    position: absolute;
    font-size: 12px;
    font-weight: 600;
    transform: translateX(-50%);
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
    color: #333;
    padding: 2px 6px;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
}




/* Анимация пульсации */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Для темного фона можно сделать светлый индикатор */
.dark-mode .current-indicator,
.dark-mode .current-indicator::before,
.dark-mode .current-indicator::after {
    background: #fff;
    box-shadow: 
        0 0 0 2px rgba(0,0,0,0.8),
        0 0 10px rgba(255,255,255,0.5);
}

.current-indicator:hover::after {
    opacity: 1;
}


.status-kz { 
    background: linear-gradient(to bottom, #ff6b6b, #d32f2f);
    color: white;
    border: 1px solid #d32f2f;
}

.status-fire { 
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    color: white;
    border: 1px solid #f57c00;
}

.status-attention { 
    background: linear-gradient(to bottom, #fff176, #fbc02d);
    border: 1px solid #fbc02d;
}

.status-norm { 
    background: linear-gradient(to bottom, #81c784, #388e3c);
    color: white;
    border: 1px solid #388e3c;
}

.status-break { 
    background: linear-gradient(to bottom, #ffb74d, #f57c00);
    color: white;
    border: 1px solid #f57c00;
}

/* Анимация при наведении на сегменты */
.scale-segment:hover {
    transform: scaleY(1.1);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}


/* Добавьте это в файл status-scale.css */

/* Стили для всплывающих подсказок */
[data-tooltip] {
    position: relative;
    cursor: help;
    z-index: 10;
}

[data-tooltip]::before,
[data-tooltip]::after {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin-bottom: 10px;
    padding: 8px 12px;
    min-width: 120px;
    /* max-width: 250px; */
    width: max-content;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 100;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin-bottom: 4px;
    border-width: 6px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
    z-index: 101;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Специальные стили для подсказок шкалы */
.scale-segment[data-tooltip]::before {
    content: attr(data-tooltip) " (" attr(data-range) ")";
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.scale-segment[data-tooltip]::after {
    border-color: #3498db transparent transparent transparent;
}

/* Стили для тултипов датчиков на схеме */
#sensor-tooltip {
    position: absolute;
    padding: 12px;
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
    max-width: 280px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    font-size: 13px;
    line-height: 1.5;
}

#sensor-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    z-index: -1;
}

#sensor-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

#sensor-tooltip h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

#sensor-tooltip .sensor-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

#sensor-tooltip .sensor-status.normal {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

#sensor-tooltip .sensor-status.triggered {
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: white;
}

#sensor-tooltip .sensor-detail {
    margin: 6px 0;
    display: flex;
    justify-content: space-between;
}

#sensor-tooltip .sensor-detail strong {
    color: #3498db;
    font-weight: 600;
}

#sensor-tooltip .sensor-note {
    margin-top: 8px;
    font-style: italic;
    color: #7f8c8d;
    font-size: 12px;
    text-align: center;
}

/* Базовые стили для нативных тултипов */
::tooltip {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 250px;
    opacity: 1 !important; /* Важно - отключаем fade-эффект */
}

/* Для браузеров, которые не поддерживают ::tooltip (полифил) */
[tooltip] {
    position: relative;
    cursor: help;
}

[tooltip]:hover::after {
    content: attr(tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
}

[tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
    margin-bottom: -1px;
    z-index: 101;
}



.native-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    pointer-events: none;
    max-width: 250px;
    text-align: center;
    transform: translateX(-50%);
}

.native-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}



/* Полностью переработанный стиль для current-indicator */
.scale-container {
    position: relative;
    margin: 40px 0; /* Увеличиваем отступы для индикатора */
}

.scale-bar {
    position: relative; /* Важно для позиционирования индикатора */
    z-index: 10;
}



/* Анимация мигания */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}





/* Стили погрешности*/
.current-indicator {
    position: absolute;
    top: 0px;
    left: 50%;
    width: 4px;
	height: 60px;
    background: #000;
    z-index: 20;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 
        0 0 0 2px rgba(255,255,255,0.8),
        0 0 10px rgba(0,0,0,0.5);
    animation: pulse 2s infinite;
}

.current-indicator-error-range {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 15;
}

.current-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 0 3px rgba(255,255,255,0.8),
        0 2px 5px rgba(0,0,0,0.3);
}

.current-indicator::after {
    content: attr(data-value);
    position: absolute;
	color: black;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    background: #000;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
}


.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
}

/* Tooltip text */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
 
  /* Position the tooltip text - see examples below! */
  position: absolute;
  z-index: 1;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
  visibility: visible;
}













