/*
Theme Name: Reboot Child
Theme URI: https://wpshop.ru/themes/reboot
Description: Дочерняя тема для Reboot
Author: WPShop
Author URI: https://wpshop.ru/
Template: reboot
Version: 1.0.0
*/

/* ==========================================================================
   1. АДАПТИВНЫЕ ПЛАШКИ ТЕГОВ (ГЛАВНАЯ СТРАНИЦА + ВНУТРИ СТАТЕЙ)
   ========================================================================== */

/* 
   ГИБКИЙ КОНТЕЙНЕР
   Принудительно включает Flexbox на главной странице (.home, .blog), в архивах и в статьях.
*/
.custom-tags-container,
.tags-display-wrapper,
.home .custom-tags-container,
.blog .custom-tags-container,
.archive .custom-tags-container,
.site-main .custom-tags-container,
.post-card .custom-tags-container,
.entry-content .custom-tags-container,
div[class*="custom-tags"] {
    display: flex !important;
    flex-wrap: wrap !important;        /* Перенос тегов на новую строку */
    gap: 10px !important;              /* Зазоры между плашками */
    margin: 15px 0 !important;         /* Внешние отступы сверху и снизу */
    padding: 0 !important;
    list-style: none !important;
    justify-content: flex-start !important; /* Выравнивание по левому краю */
    align-items: center !important;
    width: 100% !important;
}

/* 
   КОМПАКТНАЯ ПЛАШКА ТЕГА
   Отменяет растяжение темы Reboot на главной странице (width: auto).
*/
.custom-tags-container a,
.tags-display-wrapper a,
.tag-item,
.home .custom-tags-container a,
.blog .custom-tags-container a,
.archive .custom-tags-container a,
.site-main .custom-tags-container a,
.post-card .custom-tags-container a,
.entry-content .custom-tags-container a,
div[class*="custom-tags"] a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;            /* Сжимаем ширину строго по длине текста */
    max-width: 100% !important;
    padding: 8px 16px !important;      /* Внутренние отступы */
    background-color: #1a1a1a !important; /* Тёмно-серый фон */
    background: #1a1a1a !important;
    border: 1px solid #ffd700 !important; /* Золотая обводка */
    border-radius: 20px !important;    /* Овальная форма */
    color: #e0e0e0 !important;          /* Светло-серый текст */
    font-size: 14px !important;
    line-height: 1.3 !important;
    text-decoration: none !important;   /* Без подчеркивания */
    box-shadow: none !important;        /* Сброс стандартных теней темы */
    transition: all 0.25s ease-in-out !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}

/* 
   ЭФФЕКТ ПРИ НАВЕДЕНИИ МЫШИ (HOVER)
*/
.custom-tags-container a:hover,
.tags-display-wrapper a:hover,
.tag-item:hover,
.home .custom-tags-container a:hover,
.blog .custom-tags-container a:hover,
.archive .custom-tags-container a:hover,
.site-main .custom-tags-container a:hover,
.post-card .custom-tags-container a:hover,
.entry-content .custom-tags-container a:hover,
div[class*="custom-tags"] a:hover {
    background-color: #2b2b2b !important;
    background: #2b2b2b !important;
    color: #ffd700 !important;          /* Золотой цвет текста */
    border-color: #ffffff !important;   /* Белая подсветка границы */
    transform: translateY(-2px) !important; /* Легкий подъём вверх */
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25) !important;
}

/* ==========================================================================
   2. ВСТРОЕННЫЙ КОД И ПЛАШКИ (НАПРИМЕР, CLAUDE.md)
   ========================================================================== */

code,
kbd,
mark,
p code,
td code,
.wp-block-code code {
    background-color: #2b2b2b !important;
    background: #2b2b2b !important;
    color: #ffd700 !important;
    padding: 3px 7px !important;
    border-radius: 5px !important;
    border: 1px solid #444444 !important;
    font-size: 0.9em !important;
}

pre,
.wp-block-code {
    background-color: #1a1a1a !important;
    border: 1px solid #ffd700 !important;
    border-radius: 8px !important;
    padding: 15px !important;
}

/* ==========================================================================
   3. ТАБЛИЦЫ С ЗОЛОТОЙ ОБВОДКОЙ
   ========================================================================== */

.entry-content table,
table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #ffd700 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    width: 100% !important;
    margin: 20px 0 !important;
    background-color: #1a1a1a !important;
}

.entry-content table th,
.entry-content table td,
table th,
table td {
    border: 1px solid #333333 !important;
    padding: 12px 15px !important;
    color: #e0e0e0 !important;
}

.entry-content table th,
table th {
    background-color: #252525 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #ffd700 !important;
}

/* ==========================================================================
   4. БЛОК "СОДЕРЖАНИЕ" (TABLE OF CONTENTS)
   ========================================================================== */

.post-toc,
.entry-toc,
div[class*="toc"],
nav[class*="toc"],
#toc {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    border: 1px solid #ffd700 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    color: #e0e0e0 !important;
}

div[class*="toc"] a,
nav[class*="toc"] a,
#toc a {
    color: #e0e0e0 !important;
    text-decoration: none !important;
}

div[class*="toc"] a:hover,
nav[class*="toc"] a:hover,
#toc a:hover {
    color: #ffd700 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   5. АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (ЭКРАНЫ ДО 480PX)
   ========================================================================== */

@media screen and (max-width: 480px) {
    .custom-tags-container,
    .tags-display-wrapper,
    .home .custom-tags-container,
    .blog .custom-tags-container,
    .archive .custom-tags-container,
    .site-main .custom-tags-container,
    .post-card .custom-tags-container,
    .entry-content .custom-tags-container {
        gap: 8px !important;
    }

    .custom-tags-container a,
    .tags-display-wrapper a,
    .tag-item,
    .home .custom-tags-container a,
    .blog .custom-tags-container a,
    .archive .custom-tags-container a,
    .site-main .custom-tags-container a,
    .post-card .custom-tags-container a,
    .entry-content .custom-tags-container a {
        padding: 6px 12px !important;   /* Уменьшенные отступы */
        font-size: 13px !important;     /* Уменьшенный шрифт */
    }
}