.workspace-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #1a1d21;
    color: white;
    font-family: Arial, sans-serif;
}

.workspace-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.site-title {
    font-size: 20px;
    font-weight: bold;
}

.icon-button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.icon-button:hover {
    transform: scale(1.1);
}

.sidebar {
    width: 260px; /* Ширина бокового блока */
    background-color: #2c2f33;
    border-right: 1px solid #3d4045;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto; /* Прокрутка для длинного списка уведомлений */
    position: relative;
}

.notifications {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100% - 281px);
    overflow: scroll;

    scrollbar-width: none; /* Для Firefox */
}

.notifications::-webkit-scrollbar {
    display: none; /* Для WebKit-браузеров (Chrome, Safari) */
}

.notification {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    background-color: #32363c;
    border-radius: 4px;
    font-size: 14px;
    position: relative;
    /*overflow: hidden;*/
    /*height: 64px;*/
}

.notification i {
    font-size: 18px;
    color: #79c402;
}

.flex-grow-right {
    flex-grow: 1;
    text-align: right;
}

.workspace-main {
    display: grid;
    position: relative;
    grid-template-columns: repeat(3, 1fr); /* Жестко задаем 3 элемента в строке */
    grid-auto-rows: 320px; /* Высота строк */
    gap: 10px; /* Отступы между секциями */
    padding: 10px;
    background-color: #1a1d21;
    overflow-y: auto;
    flex: 1;
    height: 100%; /* Занимает всю высоту рабочего пространства */
}

.workspace-main.mode-free .section-tile {
    position: absolute;
}

.section-tile {
    display: flex;
    flex-direction: column;
    background-color: #16181b;
    border: 1px solid #3d4045;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    min-height: 320px;
    min-width: 350px;
    /*padding: 10px;*/
}

.section-header {
    font-weight: bold;
    font-size: 14px;
    color: white;
    background: #3c413f; /* Градиентный фон */
    padding: 2px 12px; /* Увеличенные отступы */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Тень для выделения */
    height: 33px;
    overflow: hidden;
    position: relative;
}

.section-header-right {
    position: absolute;
    top: 1px;
    right: 10px;
    /*background: #3c413f;*/
    padding-left: 10px;
}

.section-header-left {
    float: left;
    position: relative;
    line-height: 28px;
}

.close-button {
    background: none;
    border: none;
    color: #e57373;
    font-size: 18px;
    cursor: pointer;
}

.close-button:hover {
    color: #d32f2f;
}

.section-body {
    flex: 1;
    /*display: flex;*/
    /*flex-direction: column;*/
    /*justify-content: center;*/
    /*align-items: center;*/
    color: white;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.price-diff {
    font-size: 16px;
    font-weight: bold;
    color: #ddb822; /* Зеленый цвет для положительных значений */
    margin-left: auto;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.price-diff.negative {
    color: #ddb822; /* Красный цвет для отрицательных значений */
}


.time-interval {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3); /* Полупрозрачный текст */
    pointer-events: none; /* Чтобы текст не мешал взаимодействию с графиком */
}

.autocomplete-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #3c413f;
    border-radius: 2px;
    background-color: #2c2f33;
    color: white;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2c2f33;
    border: 1px solid #3c413f;
    border-radius: 2px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    margin: 0;
    padding: 0;
    list-style: none;
}

.autocomplete-item {
    padding: 4px 16px;
    font-size: 12px;
    cursor: pointer;
    color: white;
}

.autocomplete-item:nth-child(even) {
    background-color: #3d4045; /* Цвет для чётных строк */
}

.autocomplete-item:hover {
    background-color: #505357; /* Цвет при наведении */
}

.autocomplete-input:focus {
    outline: none; /* Убирает стандартную подсветку */
    box-shadow: none; /* Убирает тень */
    border-color: #3d4045; /* Оставляет стандартный цвет границы */
}

.sidebar-actions-button {
    height: 40px;
    position: absolute;
    bottom: 0;
    background-color: #3c413f;
    width: 100%;
    left: 0;
    box-shadow: 2px 0px 8px rgba(0, 0, 0, 0.2);
}

.logout-icon-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s ease;
}

.logout-icon-button:hover {
    color: #e57373;
}

.highlight {
    animation: blink 0.5s ease;
}

@keyframes blink {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(83, 220, 53, 0.3); /* Полупрозрачный красный */
    }
}

.sidebar-actions-button {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    background-color: #3c413f;
    box-shadow: 2px 0px 8px rgba(0, 0, 0, 0.2);
}

.icon-button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s ease;
}

.icon-button:hover {
    transform: scale(1.2);
    color: #e57373;
}

.edit-button {
    background: none;
    border: none;
    color: rgba(121, 196, 2, 0.7);
    font-size: 18px;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.2s ease, color 0.3s ease;
}

.edit-button:hover {
    color: #5cbf02;
}

.more-button {
    background: none;
    border: none;
    color: rgba(2, 196, 173, 0.7);
    font-size: 18px;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.2s ease, color 0.3s ease;
}

.more-button:hover {
    color: #02c4ad;
}

.close-button {
    background: none;
    border: none;
    color: rgba(196, 60, 2, 0.7);
    font-size: 18px;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.2s ease, color 0.3s ease;
}

.close-button:hover {
    color: #bf4402;
}

.notification-time {
    font-size: 0.8em;
    color: #aaaaaa;
}

.settings {
    position: absolute;
    bottom: 40px;
    width: 100%;
    left: 0;
    /*padding-bottom: 16px;*/
    background-color: #2d2f33;
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    color: white;
}

.slider-label {
    margin-bottom: 10px;
    font-size: 14px;
    color: #ffe7ce;
}

input[type="range"] {
    width: 80%;
    -webkit-appearance: none;
    background: #3d4045;
    height: 5px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #79c402;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #79c402;
    border-radius: 50%;
    cursor: pointer;
}

.section-bottom {
    font-size: 12px;
    height: 26px;
    background-color: #3c413f;
    line-height: 26px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
    color: #fff;
    position: relative;
}

.section-bottom-right {
    position: absolute;
    right: 8px;
    top: 0;
    height: 26px;
    /*background-color: #3c413f;*/
}

.ex-base {
    color: #bababa;
    display: inline-block;
    padding: 0 8px;
    margin: 0 4px;
}

.ex-strong {
    background-color: #714545;
    color: #dcbcbc;
    text-transform: uppercase;
}

.lps {
    width: 60px;
    position: absolute;
    right: 0;
    top: 20px;
    height: calc(100% - 40px);
}

.lps-item {
    border-bottom: 1px solid transparent;
    height: 1px;
    width: 100%;
    display: none;
}

.price-label {
    position: absolute;
    color: white;
    font-size: 12px;
    border-radius: 2px;
    transform: translateY(-50%);
    padding: 0 4px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #333;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    border-bottom: 1px solid #484d54;
}

.connected {
    color: #36cc3d;
}

.disconnected {
    color: #ff4d4f;
}

@keyframes highlight {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(152, 65, 0, 0.8); /* Яркий красный цвет */
    }
}

.notification.highlight {
    animation: highlight 0.4s ease-in-out 3; /* Длительность 1 секунда, 3 цикла */
}

.chart-controls button {
    background-color: #2c2f33;
    color: white;
    border: 1px solid #3d4045;
    border-radius: 4px;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chart-controls button.active {
    background-color: #79c40269;
    color: #ffffff;
}

.chart-label {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}

.chart-button {
    position: relative;
    padding-left: 16px; /* Отступ для полоски */
    background-color: #2c2f33;
    color: white;
    border: 1px solid #3d4045;
    border-radius: 4px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.autocomplete-item.selected {
    background-color: #668050;
}

.v32 {
    /*font-weight: bold;*/
    font-size: 12px;
    line-height: 26px;
    cursor: pointer;

    /*background: #539505;*/
    padding: 2px 8px;
    border-radius: 2px;
    margin: 0 2px;
}

.v33 {
    /*font-weight: bold;*/
    font-size: 12px;
    line-height: 26px;
    cursor: pointer;

    background: #539505;
    padding: 2px 8px;
    margin: 0 2px;
    border-radius: 2px;
}

/* В стилях */
.v33.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* В стилях */
.notification-markets {
    margin-top: 2px;
    font-size: 10px;
    color: #aaaaaa;
}

.market-item {
    background-color: #7e1515;
    padding: 2px 6px;
    border-radius: 4px;
    color: #ffffff;
    text-transform: uppercase;
}

.notification-pre-label {
    height: 100%;
    width: 6px;
    position: absolute;
    top: 0;
    left: 0;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.195) 0 2px, rgba(255, 255, 255, 0) 2px 8px),
    linear-gradient(#088cc5, #088cc5); /* базовый красный фон */
    background-blend-mode: normal;
    background-size: auto;
    border-radius: 4px 0 0 4px;
}

.notification-pre-label-positive {
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.195) 0 2px, rgba(255, 255, 255, 0) 2px 8px),
    linear-gradient(#157e3a, #157e3a); /* базовый зеленый фон */
    background-blend-mode: normal;
    background-size: auto;
}

.notification-pre-label-negative {
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.195) 0 2px, rgba(255, 255, 255, 0) 2px 8px),
    linear-gradient(#c50808, #c50808); /* базовый красный фон */
    background-blend-mode: normal;
    background-size: auto;
}

.notification-pre-label-arbitrage_b0b33{
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.195) 0 2px, rgba(255, 255, 255, 0) 2px 8px),
    linear-gradient(#a75320, #a75320);
    background-blend-mode: normal;
    background-size: auto;
}

.notification-pre-label-arbitrage_fair{
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.195) 0 2px, rgba(255, 255, 255, 0) 2px 8px),
    linear-gradient(#c09102, #c09102);
    background-blend-mode: normal;
    background-size: auto;
}

.pd-item {
    background-color: #155e7e;
    padding: 1px 4px;
    color: #ffffff;
    text-transform: uppercase;
}

.pd-item-positive {
    background-color: #157e3a;
}

.pd-item-negative {
    background-color: #c50808;
}

/* === Ручки для изменения размеров === */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: transparent;
    z-index: 10;
}

.resize-handle.top-left {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}

.resize-handle.top-right {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}

.resize-handle.bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: nesw-resize;
}

.resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: nwse-resize;
}

/* Стили для элемента-призрака */
.sortable-ghost {
    opacity: 0.6;
}

/* Стили для выбранного элемента */
.sortable-chosen {
    opacity: 0.2;
}

.canvas-hover {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 70px);
    height: calc(100% + 20px);
    z-index: 5;
}

/**
    Стили для загрузчика графика
 */
.chart-loader {
    position: absolute;
    top: calc(50% - 50px);
    left: calc(50% - 50px + 40px);
}

.chart-loader-spinner {
    position: relative;
    width: 100px;
    height: 100px;
}

.spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #ffe7ce;
    border-bottom-color: #79c402;
    animation: spin 1.5s linear infinite;
}

.spinner:before, .spinner:after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 4px solid transparent;
}

.spinner:before {
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-top-color: #79c402;
    border-bottom-color: #ffe7ce;
    animation: spin 2s linear infinite;
}

.spinner:after {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-top-color: #ffe7ce;
    border-bottom-color: #79c402;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/**/
.chart-controls-item {
    display: inline-block;
}

.chart-controls-item-label {
    background-color: #2c2f33;
    color: white;
    border: 1px solid #3d4045;
    border-radius: 4px;
    padding: 0 4px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.chart-controls-item-els {
    display: inline-block;
}

.chart-controls-item-els-item {
    background-color: #2c2f33;
    color: white;
    border: 1px solid #3d4045;
    border-radius: 4px;
    padding: 0 4px;
    margin-left: 2px;
    transition: background-color 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.chart-controls-item-els-item.active {
    background-color: #79c40269;
}

.chart-controls-item-separator {
    margin: 0 10px;
    display: inline-block;
    color: #737b87;
}

/***/
.s-link-source {
    /*font-weight: bold;*/
    font-size: 14px;
    color: white;
    background: rgba(60, 65, 63, 0.8);
    padding: 2px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    height: 26px;
    width: 100%;
    left: 0;
    top: -40px;
    opacity: 0;
    /*top: 2px;*/
    overflow: hidden;
    position: absolute;
    transition: all .3s ease;
    z-index: 10;
}

.s-link-source.active {
    top: 2px;
    opacity: 1;
}

.s-link-source-item {
    background-color: #2c2f33;
    color: white;
    border: 1px solid #3d4045;
    border-radius: 2px;
    padding: 0 4px;
    line-height: 18px;
    margin-right: 2px;
    transition: background-color 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.s-link-source-item-separator {
    display: inline-block;
    width: 10px;
}


/***/
.search-list-token-source {
    color: white;
    border: 1px solid #3d4045;
    border-radius: 2px;
    padding: 0 4px;
    line-height: 16px;
    margin-right: 2px;
    transition: background-color 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

#notification-tooltip {
    position: fixed;
    width: 304px;
    height: 180px;
    background: none;
    color: #fff;
    /*padding: 8px;*/
    box-sizing: border-box;
    border-radius: 4px;
    border: 2px solid rgba(112, 107, 107, 0.7);
    z-index: 9999;
    pointer-events: none; /* не мешает событиям мыши */
    /*display: flex;*/
    /*align-items: center;*/
    /*justify-content: center;*/
    font-size: 14px;
    user-select: none;
}

#notification-tooltip img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

/* Стили для пунктов меню бана */

/* Выделение активного пункта меню с открытым подменю */
::ng-deep .mat-mdc-menu-item.cdk-program-focused,
::ng-deep .mat-mdc-menu-item.cdk-keyboard-focused,
::ng-deep .mat-mdc-menu-item[aria-expanded="true"] {
    background-color: rgba(52, 152, 219, 0.25) !important;
}

/* Индикатор статуса звука в toolbar */
.sound-status-indicator {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding-right: 20px;
}

.sound-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sound-status i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.sound-status.active {
    background-color: rgba(121, 196, 2, 0.15);
    border: 1px solid rgba(121, 196, 2, 0.4);
}

.sound-status.active i {
    color: #79c402;
}

.sound-status.inactive {
    background-color: rgba(229, 115, 115, 0.15);
    border: 1px solid rgba(229, 115, 115, 0.4);
    animation: pulseWarning 2s ease-in-out infinite;
}

.sound-status.inactive i {
    color: #e57373;
}

@keyframes pulseWarning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.sound-status:hover {
    transform: scale(1.05);
}

/* Баннер активации звука */
.sound-activation-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    animation: slideUp 0.4s ease-out, pulse 2s ease-in-out infinite 1s;
}

@keyframes slideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.02);
    }
}

.sound-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #2c2f33 0%, #3c413f 100%);
    border: 2px solid #79c402;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(121, 196, 2, 0.3);
    transition: all 0.3s ease;
    user-select: none;
}

.sound-banner-content:hover {
    background: linear-gradient(135deg, #3c413f 0%, #4c514f 100%);
    border-color: #8fd419;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 30px rgba(121, 196, 2, 0.5);
    transform: translateY(-2px);
}

.sound-banner-content:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 15px rgba(121, 196, 2, 0.4);
}

.sound-banner-content i {
    font-size: 22px;
    color: #79c402;
}

.sound-banner-content i:first-child {
    animation: soundWave 1.5s ease-in-out infinite;
}

.sound-banner-content i:last-child {
    animation: ringBell 2s ease-in-out infinite;
}

@keyframes soundWave {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes ringBell {
    0%, 90%, 100% {
        transform: rotate(0deg);
    }
    92% {
        transform: rotate(-15deg);
    }
    94% {
        transform: rotate(15deg);
    }
    96% {
        transform: rotate(-10deg);
    }
    98% {
        transform: rotate(10deg);
    }
}

/* Стили для меню управления линиями */
.lines-menu-header {
    padding: 8px 16px;
    text-align: center;
    background-color: #2c2f33;
    pointer-events: none;
}

.lines-menu-group {
    padding: 4px 0;
}

.lines-menu-group-label {
    padding: 0 16px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 4px 0;
}

.lines-menu-item {
    padding-left: 16px !important;
    font-size: 14px;

    height: 24px !important;
    min-height: 24px !important;
}

.lines-menu-item i {
    margin-right: 8px;
    font-size: 12px;
}

.lines-menu-color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

