﻿
/*Основной шрифт*/
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 400,500,600;
    src: url('../fonts/raleway-v29-cyrillic_cyrillic-ext_latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


::-webkit-scrollbar {
    width: 1px;
    overflow-y: scroll;
}

::-webkit-scrollbar-thumb {
    border-radius: 1px;
}

.icon-card {
    padding-bottom: 11px;
}

.space-card {
    padding-bottom: 46px;
}

.card-content-menu {
    text-align: end;
    margin-top: -40px;
    margin-right: -15px;
    font-size: large;
}

    .card-content-menu i {
        font-size: large;
    }

[data-site_mode="dark"] .card-content-menu i {
    color: #f5f5f5;
}

[data-site_mode="dark"] .a-primary {
    text-decoration: none;
    font-size: 35px;
    color: #f5f5f5;
}

.a-accent {
    text-decoration: none;
    font-size: 35px;
    color: var(--accent-color);
}

.a-primary {
    text-decoration: none;
    font-size: 35px;
    color: #455a64;
}

.area {
    z-index: 2;
    position: relative;
}

.large {
    font-size: larger
}

.icon {
    font-size: larger
}

.cb-padding {
    padding: 0rem;
}

.cb-padding-n {
    padding: 2rem;
}

.display-none {
    display: none;
}

.padding-left {
    padding-left: 10px;
}

.sidenav .user-view {
    margin: 0px 0 15px 0;
    height: 100px;
    background-size: cover;
    background-position: center;
}





.highlight {
    width: 100%;
    border-collapse: collapse;
}

    .highlight th, .highlight td {
        padding: 8px;
        /* border: 1px solid #ddd;*/
    }

.accent-text {
    /*font-weight: bold;*/
}

.primary-text {
    display: inline-block;
}

.data-description, .data-value {
    display: block;
}

@media (max-width: 600px) {
    .highlight th, .highlight td {
        /*display: block;*/
        width: 100%;
    }

    .highlight tr {
        margin-bottom: 10px;
        display: block;
    }

    .highlight thead {
        display: none;
    }
}

/* Плавное появление Wi-Fi записи */
.collection-item.fade-in {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .collection-item.fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* Hover эффект */
#WiFiList .collection-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.signal-icon {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.lock-icon {
    font-size: 18px;
    color: #757575;
    margin-left: 6px;
    vertical-align: middle;
}

.param-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-value {
    margin-left: 5px;
}

.btn-group {
    display: flex; /* Ряд кнопок */
    gap: 8px; /* Расстояние между кнопками */
    margin-left: auto; /* Отодвигает группу кнопок к правому краю */
}

.fade-in {
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

.hidden {
    display: none;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

    .overlay.hidden {
        display: none;
    }

.overlay-text {
    margin-top: 15px;
    font-size: 16px;
    color: #1565c0;
    font-weight: 500;
}



/*Commands*/

#MainContent_ctl00_DevicesList_ParamValue {
    white-space: normal; /* разрешить переносы по пробелам */
    overflow-wrap: break-word; /* доп. защита, перенос если слово длинное */
}

.item {
    font-size: smaller;
}

.pointer {
    cursor: pointer;
}

/*Configuration*/
/* Плавное появление Wi-Fi записи */
.collection-item.fade-in {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .collection-item.fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
/* Hover эффект */
#WiFiList .collection-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.signal-icon {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.lock-icon {
    font-size: 18px;
    color: #757575;
    margin-left: 6px;
    vertical-align: middle;
}

.param-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-value {
    margin-left: 5px;
}

.btn-group {
    display: flex; /* Ряд кнопок */
    gap: 8px; /* Расстояние между кнопками */
    margin-left: auto; /* Отодвигает группу кнопок к правому краю */
}

.fade-in {
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

.hidden {
    display: none;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

    .overlay.hidden {
        display: none;
    }

.overlay-text {
    margin-top: 15px;
    font-size: 16px;
    color: #1565c0;
    font-weight: 500;
}

.highlight {
    width: 100%;
    border-collapse: collapse;
}

    .highlight th, .highlight td {
        padding: 8px;
        /* border: 1px solid #ddd;*/
    }

.accent-text {
    font-weight: bold;
}

.primary-text {
    display: inline-block;
}

.data-description, .data-value {
    display: block;
}

.right {
    margin-top: 5px;
}

@media (max-width: 600px) {
    .highlight th, .highlight td {
        /*display: block;*/
        width: 100%;
    }

    .highlight tr {
        margin-bottom: 10px;
        display: block;
    }

    .highlight thead {
        display: none;
    }
}


/* Автоматизации - Парсер ШАГОВ сценария */
.valid-boolean {
    border-bottom: 1px solid #4CAF50 !important;
    box-shadow: 0 1px 0 0 #4CAF50 !important;
}

.valid-number {
    border-bottom: 1px solid #2196F3 !important;
    box-shadow: 0 1px 0 0 #2196F3 !important;
}

.valid-time {
    border-bottom: 1px solid #ffeb3b !important;
    box-shadow: 0 1px 0 0 #ffeb3b !important;
}

.invalid {
    border-bottom: 1px solid #F44336 !important;
    box-shadow: 0 1px 0 0 #F44336 !important;
}
.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-delay {
    width: 60px;
}

.delay-label {
    font-size: 1em;
    color: #555;
}

.step-item {
    display: flex;
    flex-direction: column; /* текст сверху, кнопки снизу */
    padding: 10px;
    gap: 0.3rem;
}

.step-text {
    font-weight: 500;
    margin-bottom: 8px;
}

.step-actions {
    display: flex;
    justify-content: center; /* кнопки по центру под текстом */
    gap: 10px;
    flex-wrap: wrap;
}

    .step-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px 8px;
        border-radius: 4px;

        text-decoration: none;
        font-size: 14px;
        transition: background-color 0.2s;
    }

        .step-actions a:hover {
           
        }

.step-number {
    font-weight: bold;
    margin-right: 0.5rem;
}

.textarea-json {
    font-family: monospace;
}

@media (min-width: 768px) {
    .step-item {
        flex-direction: row; /* в одну строку */
        /*align-items: center;*/ /* вертикальное выравнивание */
    }

    .step-number {
        margin-right: 0.5rem;
    }

    .step-text {
        margin: 0 1rem 0 0; /* отделяем текст от номера и кнопок */
        white-space: nowrap; /* текст в одну строку */
    }

    .step-actions {
        margin-left: auto; /* кнопки прижаты к правому краю */
        justify-content: flex-start; /* горизонтально слева внутри блока */
    }
}


/*Слилизация JSON*/
.json-view {
    margin-top: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 13px;
}

/* Ключ */
.json-key {
    /*  font-weight: bold; */
    color: var(--accent-color);
}

/* Строки */
.json-string {
}

/* Числа */
.json-number {
    color: var(--primary-color);
}

/* Boolean */
.json-boolean {
    /*  font-weight: bold; */
}

/* Null */
.json-null {
    font-style: italic;
    opacity: 0.7;
}





/*Анимация времени*/


.inactive-highlight {
    color: var(--accent-color);
    font-weight: bold;
    animation: textGlow 1s ease-in-out;
    animation-iteration-count: 15;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 0px var(--accent-color);
    }

    50% {
        text-shadow: 0 0 12px var(--accent-color);
    }

    100% {
        text-shadow: 0 0 0px var(--accent-color);
    }
}







/* =========================
TIMELINE БАЗОВЫЕ СТИЛИ
========================= */
.timeline {
    position: relative;
    padding: 20px 0;
}

.verline {
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

/* =========================
ГРУППИРОВКА ПО ДАТЕ
========================= */
.timeline-date-header {
    padding: 8px;
    border-radius: 4px;
    margin: 16px 0;
    font-weight: 500;
    text-align: center;
}

/* =========================
КАРТОЧКИ СОБЫТИЙ
========================= */
.event {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}
    .event .date {
        width: 80px;
        text-align: right;
        padding-right: 20px;
        font-weight: bold;
    }
        .event .date h4 {
            margin: 0;
            font-size: 24px;
            line-height: 1.2;
        }
    .event .card-panel {
        flex: 1;
        margin: 0 0 0 20px;
        position: relative;
        transition: all 0.3s ease;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 16px;
    }
        .event .card-panel:hover {
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

/* =========================
ПОДСВЕТКА ЛЕВОЙ СТОРОНЫ ПО КРИТИЧНОСТИ
========================= */
/* Подсветка карточек */
.card-online {
    border-left: 4px solid #4caf50 !important;
    background: #f1f8e9;
}

.card-offline {
    border-left: 4px solid #f44336 !important;
    background: #ffebee;
}


.card-low {
    border-left: 4px solid #4caf50 !important;
}

.card-medium {
    border-left: 4px solid #ffc107 !important;
}

.card-high {
    border-left: 4px solid #ff9800 !important;
}

.card-critical {
    border-left: 4px solid #f44336 !important;
    animation: pulseRed 2s infinite;
}

.card-warning {
    border-left: 4px solid #ff9800 !important;
}

.card-flapping {
    border-left: 4px solid #ff5722 !important;
    animation: pulseOrange 1s infinite;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 2px 5px rgba(244, 67, 54, 0.2);
    }

    50% {
        box-shadow: 0 2px 15px rgba(244, 67, 54, 0.4);
    }

    100% {
        box-shadow: 0 2px 5px rgba(244, 67, 54, 0.2);
    }
}

@keyframes pulseOrange {
    0% {
        border-left-color: #ff5722;
    }

    50% {
        border-left-color: #ff9800;
    }

    100% {
        border-left-color: #ff5722;
    }
}

/* =========================
ЭЛЕМЕНТЫ КАРТОЧКИ
 ========================= */
.timeline-event {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.timeline-object {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.timeline-user {
   /* margin: 6px 0;
    padding: 4px 8px;
    display: inline-block;
    font-size: 12px;*/
}

/* Включено - зелёный */
.card-enabled {
    border-left: 4px solid #4caf50 !important;
    background: #f1f8e9;
}

/* Выключено - жёлтый */
.card-disabled {
    border-left: 4px solid #ffc107 !important;
    background: #fff8e1;
}
/* =========================
ПОЛЬЗОВАТЕЛЬ
========================= */
.timeline-user {
    /*margin: 6px 0;
    padding: 4px 8px;
    background: #e3f2fd;
    border-radius: 16px;
    display: inline-block;
    font-size: 12px;
    */
}
/* =========================
РАСКРЫВАЮЩИЕСЯ БЛОКИ
========================= */
.timeline-details {
    margin-top: 8px;
    border-radius: 6px;
}
    .timeline-details summary {
        cursor: pointer;
        font-weight: 500;
        font-size: 0.9em;
        padding: 6px 0;
        display: inline-block;
        transition: all 0.2s ease;
        list-style: none;
    }
        .timeline-details summary::-webkit-details-marker {
            display: none;
        }
        .timeline-details summary::before {
            content: '▶';
            display: inline-block;
            margin-right: 8px;
            font-size: 10px;
            transition: transform 0.2s ease;
        }
    .timeline-details[open] summary::before {
        transform: rotate(90deg);
    }
    .timeline-details summary:hover {
        text-decoration: underline;
    }
.timeline-meta {
    margin-top: 8px;
    padding: 8px 12px;
}
    .timeline-meta div {
        margin-bottom: 6px;
    }
/* =========================
ГЕОЛОКАЦИЯ
========================= */
.timeline-geo {
    margin: 8px 0;
}

/* =========================
 CORRELATION ID
========================= */
.timeline-meta code {
    /*padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid #e0e0e0;
    */
}

/* =========================
MQTT
========================= */
.timeline-topic {
    margin-top: 4px;
    font-size: 0.85em;
}
    .timeline-topic code {
        padding: 2px 4px;
    }
.timeline-operation {
    margin-top: 4px;
    font-size: 0.9em;
}

/* =========================
 КЛЮЧИ СОСТОЯНИЙ
========================= */
.timeline-state-keys {
    margin: 8px 0;
    padding: 4px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.state-key {

    align-items: center;
    gap: 4px;
    padding: 2px 8px;
}
/* =========================
СЕНСОРЫ
========================= */

.sensor-item {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 6px;
    padding: 4px 10px;
    background: #cdcecc33;
    border-radius: 16px;
    font-size: 12px;
    font-family: monospace;
    border: 1px solid #e0e0e0;
}

.sensor-icon {
    margin-right: 6px;
}

.battery-low {
    background: #cdcecc33;
    font-weight: bold;
    border-color: #ffcdd2;
}

.signal-good {
    background: #cdcecc33;
    border-color: #c8e6c9;
}

.signal-medium {
    background: #cdcecc33;
    border-color: #ffe0b2;
}

.signal-poor {
    background: #cdcecc33;
    border-color: #ffcdd2;
}

/* =========================
 BLE
 ========================= */
.ble-section {
    margin-top: 10px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #e8eaf6;
}

    .ble-section .section-title {
        font-size: 11px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.ble-content {
    display: flex;
    flex-wrap: wrap;
    margin-top: 6px;
    gap: 6px;
}

/* =========================
АНАЛИТИКА И ПРЕДУПРЕЖДЕНИЯ
========================= */
.timeline-analytics {
    margin-top: 8px;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #e3f2fd;
}

.timeline-warning-chip {
    padding: 8px;
    color: #c62828;
}


.timeline-warning-text {
    color: #ff9800;
}

/* =========================
JSON ПРОСМОТРЩИК
========================= */

.json-view-timeline {
    background: #263238;
    color: #aabfc9;
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
    overflow-x: auto;
    margin-top: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    border: 1px solid #37474f;
    line-height: 1.4;
}

.json-key {
    color: #7c7cff;
    font-weight: 500;
}

.json-string {
    color: #6fbf6f;
}

.json-number {
    color: #ff9b4a;
}

.json-boolean {
    color: #ff7b72;
}

.json-null {
    color: #ff7b72;
    font-style: italic;
}

/* =========================
ТЕГИ
========================= */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 4px;
    border: 1px solid #e0e0e0;
}

/* =========================
ЗАГРУЗКА
========================= */
#loadingIndicator {
    display: flex;
    justify-content: center;
    padding: 40px;
}

/* =========================
 ФИЛЬТРЫ
========================= */
#filterObjectType {
    height: 42px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    padding: 0 12px;
    font-size: 14px;
}

/* =========================
АДАПТИВНОСТЬ
========================= */
@media (max-width: 600px) {
    .event .date {
        width: 60px;
        font-size: 12px;
    }

        .event .date h4 {
            font-size: 18px;
        }

    .timeline-event {
        font-size: 0.9em;
    }

    .timeline-object {
        font-size: 0.8em;
    }

    .sensor-item {
        font-size: 10px;
        margin-right: 6px;
    }




    .card-panel {
        padding: 12px;
    }
}

/* Стили для шагов сценария */
.scenario-steps {
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
}

.step-item {
    padding: 4px 0;
    font-size: 12px;
}

    .step-item:last-child {
        border-bottom: none;
    }

/* Стили для условий и действий события */
.event-conditions, .event-actions {
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
}

.condition-item, .action-item {
    padding: 4px 0;
    font-size: 12px;
}

    .condition-item:last-child, .action-item:last-child {
        border-bottom: none;
    }
.unknown-fields-message {
    font-size: 12px;
    color: #e65100;
    margin-top: 4px;
    font-style: italic;
}
