/*
Theme Name: Maxi Events Help
Theme URI: https://help.maxi.events/
Description: Справочный центр Maxi Events. Внешний вид поверх Twenty Twenty-Four, без правок родительской темы и Echo Knowledge Base.
Author: Maxi Events
Template: twentytwentyfour
Version: 0.1.0
Text Domain: maxi-help
*/

.epkb-cat-icon.epkb-cat-icon--image {
    width: 100% !important;
    height: 180px !important;
    max-height: 180px !important;
    object-fit: contain;
    object-position: center;
    background: #f4f4f4;
    border-radius: 14px;
    display: block;
    margin: 0 0 14px;
}

.epkb-cat-icon.ep_font_icon_folder {
    display: none !important;
}

#eckb-article-body .wp-block-image img {
    cursor: zoom-in;
}

html.me-zoom-open {
    overflow: hidden;
}

.me-zoom {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: rgba(16, 18, 20, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.me-zoom[hidden] {
    display: none !important;
}

.me-zoom__stage {
    position: relative;
    max-width: 70vw;
    max-height: 70vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
    line-height: 0;
}

.me-zoom__stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 70vw;
    max-height: 70vh;
    border-radius: 12px;
}

.me-zoom__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    color: #222;
    font-size: 24px;
    line-height: 34px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.me-help-app-root #eckb-archive-left-sidebar,
body.me-help-app-root #eckb-archive-right-sidebar,
body.me-help-app-section #eckb-archive-left-sidebar,
body.me-help-app-section #eckb-archive-right-sidebar {
    display: none !important;
}

/* База держит слева пустую колонку сайдбара (24%), из-за неё блок уезжает вправо. */
body.me-help-app-root #eckb-archive-page-container #eckb-archive-body,
body.me-help-app-section #eckb-archive-page-container #eckb-archive-body {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 860px;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.me-help-app-root #eckb-archive-page-container #eckb-archive-content,
body.me-help-app-section #eckb-archive-page-container #eckb-archive-content {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.me-help-app-root .epkb-articles-coming-soon,
body.me-help-app-section .epkb-articles-coming-soon,
body.me-help-app-section .eckb-category-archive-articles-list-title {
    display: none;
}

body.me-help-app-root .eckb-sub-category-list-container,
body.me-help-app-root .eckb-sub-category-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.me-help-app-root .eckb-sub-category-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
}

body.me-help-app-root .eckb-sub-category-title {
    color: #222;
    font-size: 20px;
}

body.me-help-app-section .eckb-article-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.me-help-app-section #eckb-archive-content .eckb-article-container {
    position: relative;
    display: block;
    margin: 0;
    padding: 16px 44px 16px 18px !important;
    border: 1px solid #e6e6e6 !important;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

body.me-help-app-section #eckb-archive-content .epkb-ml-article-container::after {
    content: "";
    position: absolute;
    inset: 0;
}

body.me-help-app-section .eckb-article-container .eckb-article-title,
body.me-help-app-section .eckb-article-container h2,
body.me-help-app-section .eckb-article-container .eckb-article-header a {
    margin: 0;
    color: #222;
    font-size: 20px;
    line-height: 1.3;
    text-decoration: none;
}

body.me-help-app-section .eckb-article-body {
    margin-top: 6px;
    color: #666;
    font-size: 15px;
    line-height: 1.45;
}

body.me-help-app-section #eckb-archive-content .eckb-category-archive-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #009999 !important;
    z-index: 1;
}

@media (max-width: 768px) {
    .eckb-article-toc:not(.is-open) .eckb-article-toc-outline {
        display: none !important;
    }

    .eckb-article-toc__title {
        cursor: pointer;
    }

    .eckb-article-toc__title::after {
        content: " \25BE";
        color: #009999;
    }

    .eckb-article-toc.is-open .eckb-article-toc__title::after {
        content: " \25B4";
    }
}

