/*
 Theme Name:   Neve - Davidka
 Template:     neve
 Description:  Дочерняя тема Neve с подсветкой кода, Web 1.0 стилями и кастомными улучшениями.
 Author:       Davidka
 Version:      1.0
*/

/* ========================================================================
   1. Улучшение отображения номеров строк в Prism.js
   ========================================================================= */
.line-numbers .line-numbers-rows {
    left: -3.8em !important;
}

/* ========================================================================
   2. Кнопка копирования кода
   ========================================================================= */
.code-copy-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #f5f5f5;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

pre:hover .code-copy-btn {
    opacity: 1;
}

/* Подсказка при наведении */
.code-copy-btn:hover {
    background: #e0e0e0;
}

/* Добавляем кнопку к Prism-блокам */
pre[class*="language-"] {
    position: relative;
}

/* ========================================================================
   3. Web 1.0 Link Styles — классические ссылки (синие, подчёркнутые)
   ========================================================================= */

/* Обычные ссылки в контенте — только в постах (внутри .entry-content) */
.entry-content a,
.nv-content-wrap a,
.site-main a,
article a {
    color: #0000EE !important; /* Синий как в 90-х */
    text-decoration: underline !important;
    background-color: transparent !important;
    transition: none !important;
    outline: none !important;
    cursor: pointer;
}

    /* Посещённые ссылки — фиолетовые */
    .entry-content a:visited,
    .nv-content-wrap a:visited,
    .site-main a:visited,
    article a:visited {
        color: #551A8B !important; /* Классический фиолетовый */
    }

    /* При наведении — красные */
    .entry-content a:hover,
    .nv-content-wrap a:hover,
    .site-main a:hover,
    article a:hover {
        color: #FF0000 !important;
        text-decoration: underline !important;
    }

    /* При клике — ярко-красные */
    .entry-content a:active,
    .nv-content-wrap a:active,
    .site-main a:active,
    article a:active {
        color: #EE0000 !important;
    }

/* ========================================================================
   4. Исключения: не применять Web 1.0 стили к кнопкам и интерактивным элементам
   ========================================================================= */

/* Кнопки Gutenberg */
.entry-content .wp-block-button__link,
.nv-content-wrap .wp-block-button__link {
    color: inherit !important;
    text-decoration: none !important;
}

/* Теги, категории */
.nv-taglist a,
.site-main .nv-taglist a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Ссылки в подвале, шапке, виджетах */
.header--row a,
.footer--row a,
.widget a,
.site-info a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Ссылки в навигации */
.nav-menu-primary a,
.nav-menu-secondary a,
.pagination a {
    color: inherit !important;
    text-decoration: none !important;
}

/* WooCommerce (если используется) */
.woocommerce a.button,
.woocommerce a.added_to_cart,
.woocommerce nav.woocommerce-pagination a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Языковой переключатель (wp-multilang) */
.wpm-languages a {
    color: inherit !important;
    text-decoration: none !important;
}

/* ========================================================================
   5. ИСКЛЮЧЕНИЕ: не применять Web 1.0 стили к карточкам записей в архивах
   ========================================================================= */

/* Исключаем карточки записей в архивах (в блоках posts-grid) */
.o-posts-grid-post-body a,
.o-posts-grid-post-title a,
.o-posts-grid-post-meta a,
.o-posts-grid-post-category a,
.o-posts-grid-post-description a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Но оставляем Web 1.0 стили для ссылок внутри самого поста (внутри .entry-content) */
.entry-content a {
    color: #0000EE !important;
    text-decoration: underline !important;
}

/* ========================================================================
   6. Дополнительно: улучшение читаемости кода
   ========================================================================= */
pre[class*="language-"] {
    font-family: "Courier New", monospace;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    overflow: auto;
}

code {
    font-family: "Courier New", monospace;
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
}
.entry-content code,
.nv-content-wrap code,
article code,
code {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}
