/* ==========================================================================
   Объединённые кастомные стили для документации
   ========================================================================== */

/* --- 1. Базовые настройки темы --- */

/* Скрываем кнопку переключения темы */
.theme-toggle-container {
    display: none !important;
}

/* Принудительно светлый color-scheme */
:root {
    color-scheme: light !important;
}

/* Скрытие футера и анонсов */
footer,
.announcement {
    display: none !important;
}

/* --- 2. Убираем желтую подсветку якорей --- */

:target {
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

section:target > h1,
section:target > h2,
section:target > h3,
section:target > h4,
section:target > h5,
section:target > h6,
div.section:target > h1,
div.section:target > h2,
div.section:target > h3 {
    background-color: transparent !important;
}

/* --- 3. Заголовок оглавления --- */

.toc-title {
    font-size: 0 !important;
}

.toc-title::before {
    content: "Оглавление" !important;
    font-size: 0.875rem !important;
    visibility: visible !important;
    font-weight: 600 !important;
}

/* --- 4. Стили иконок Material Design --- */

/* Покрасить все иконки Material в синий цвет */
.sd-material-regular {
    color: #007bff !important;
}

/* --- 5. СТИЛЬ КРУЖКА (База) --- */
/* Применяется к блочным контейнерам и инлайновым иконкам с классом btn-inline */

.btn-circle svg.sd-material-icon,
svg.sd-material-icon.btn-inline {
    display: inline-flex !important;
    box-sizing: content-box !important;
    padding: 5px !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
    fill: #5f6368 !important;
    vertical-align: middle !important;
    margin: 0 4px !important;
    border: 1px solid #eee !important;
    cursor: pointer !important;
}

/* --- 6. ЦВЕТОВЫЕ МОДИФИКАТОРЫ --- */

/* Красим иконку в красный, если добавлен класс btn-red */
/* Используем более специфичный селектор для перекрытия базового стиля btn-inline */
svg.sd-material-icon.btn-inline.btn-red,
svg.sd-material-icon.btn-red {
    fill: #d32f2f !important;
}

/* Эффект наведения только для иконок-кнопок */
.btn-circle svg.sd-material-icon:hover,
svg.sd-material-icon.btn-inline:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16) !important;
    background-color: #f8f9fa !important;
}

/* ==========================================================================
   Стили из _static/custom.css (шрифты и поиск)
   ========================================================================== */

/* --- 7. Стили текста и шрифты --- */

/* Для основного текста */
body {
    font-family: 'Times New Roman', Arial, sans-serif !important;
}

/* Для заголовков */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Times New Roman', Arial, sans-serif !important;
}

/* Для блоков кода */
code, pre {
    font-family: 'Roboto', monospace !important;
}

/* --- 8. Кастомизация поиска (DocSearch) --- */

/* Находим контейнер с клавишами и заменяем его содержимое */
.DocSearch-Button-Keys {
    display: flex !important;
    align-items: center;
    gap: 2px;
}

/* Прячем ПЕРВУЮ клавишу (обычно это Ctrl или Cmd) */
.DocSearch-Button-Keys kbd.DocSearch-Button-Key:first-child {
    display: none !important;
}

/* Изменяем ВТОРУЮ клавишу (где была K) */
.DocSearch-Button-Keys kbd.DocSearch-Button-Key:last-child {
    font-size: 0 !important; /* Убираем букву K */
    width: auto !important;
    min-width: 20px;
    padding: 0 4px !important;
}

/* Рисуем слэш вместо K */
.DocSearch-Button-Keys kbd.DocSearch-Button-Key:last-child::before {
    content: "/" !important;
    font-size: 14px !important;
    color: inherit;
    display: inline-block;
    vertical-align: middle;
}
