/**
 * Общие стили для всех страниц приложения
 */

/* Базовые стили */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

/* Иконки */
.icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.icon-help {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23757575" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/></svg>');
}

.icon-chevron {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23757575" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');
}

/* Кнопки */
.btn {
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-primary {
    background-color: #2196f3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976d2;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Утилитарные классы */
.ml-1 { margin-left: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }

.pt-ten { padding-top: 0; }

.d-flex { display: flex; }
.align-items-end { align-items: flex-end; }

.d-flex.align-items-end {
    margin-bottom: 20px;
}

/* Кнопка "Назад" */
.back-button {
    color: #2196f3;
    margin-right: 15px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.back-button:visited,
.back-button:hover {
    color: #2196f3;
    text-decoration: none;
}

/* Основной контент */
.main-content {
    display: flex;
    height: calc(100vh - 66px); /* 66px - высота header */
    overflow: hidden;
}

/* Боковая панель */
.sidebar {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    height: calc(100vh - 66px); /* 66px - высота header */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-section {
    border-bottom: 1px solid #eee;
}

.sidebar-header {
    padding: 15px 20px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
}

.sidebar-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-item:hover {
    background-color: #f5f5f5;
}

.sidebar-item.active {
    background-color: #e3f2fd;
    color: #2196f3;
    font-weight: 500;
    border-left: 3px solid #2196f3;
}

.sidebar-item.highlighted {
    background-color: #fff3e0;
    border-left: 3px solid #ff9800;
}

.sidebar-item-inactive {
    cursor: default;
    opacity: 0.5;
    pointer-events: none;
}

.chevron-icon {
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23757575" d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transform: rotate(0deg);
    transition: transform 0.3s;
}

.chevron-icon.chevron-down {
    transform: rotate(90deg);
}

/* Рабочая область */
.workspace {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 66px); /* 66px - высота header */
}

/* Карточки */
.card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding-top: 10px;
}

/* Заголовки документов */
.document-title {
    margin: 0;
    margin-right: 10px;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

/* Табы */
.sc-llYSUQ {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.sc-llYSUQ div {
    margin-right: 1rem;
    padding: 10px 0;
    cursor: pointer;
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
}

.active-tabl {
    color: #2196f3 !important;
    border-bottom: 2px solid #2196f3;
    margin-bottom: -2px;
}

.sc-llYSUQ div:hover {
    color: #2196f3;
}

/* Анимации */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes borderPulse {
    0% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7); }
    70% { box-shadow: 0 0 0 30px rgba(33, 150, 243, 0); }
    100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0); }
}

@keyframes highlightBorderPulse {
    0% { border-color: rgba(230, 126, 34, 0.5); }
    50% { border-color: rgba(230, 126, 34, 1); }
    100% { border-color: rgba(230, 126, 34, 0.5); }
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* SVG элементы */
svg {
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Переключатель ТСД/подсказок */
.tsd-toggle-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tsd-toggle-item:hover {
    background-color: #f5f5f5;
}

.tsd-toggle-item span {
    font-size: 14px;
    color: #333;
    user-select: none;
    flex: 1;
}

.tsd-toggle-checkbox {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.tsd-toggle-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2196f3;
}

