/* Knowledge Base landing page (Echo Knowledge Base blocks). */

/* The Featured Articles block prints a black title; match the FAQ title on the dark background.
   The selector has to outrank the plugin's inline !important rule. */
body .eckb-kb-block-featured-articles #epkb-ml__module-articles-list .epkb-ml-articles-list__title span {
    color: inherit !important;
}

/* Keep the card grids in line with the navigation instead of touching the screen edges.
   The search band stays full width. */
body :is(.eckb-kb-block-basic-layout, .eckb-kb-block-featured-articles, .eckb-kb-block-faqs) {
    box-sizing: border-box;
    width: min(1140px, calc(100% - 32px));
    margin-inline: auto;
}

/* Stack the three Featured Articles lists on narrow screens. The repeated class outranks the
   plugin's three-column !important width. */
@media (max-width: 767.98px) {
    body .eckb-kb-block-featured-articles #epkb-ml__module-articles-list .epkb-ml-article-list-container .epkb-ml-articles-list__row {
        flex-direction: column;
        width: 100%;
        margin-inline: 0;
    }

    body .eckb-kb-block-featured-articles #epkb-ml__module-articles-list .epkb-ml-article-list-container .epkb-ml-articles-list__row.epkb-ml-articles-list__row > .epkb-ml-article-section.epkb-ml-article-section {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Search band: a compact panel in line with the cards, not the plugin's tall full-width default. */
body .eckb-kb-block-search {
    box-sizing: border-box;
    width: min(1140px, calc(100% - 32px));
    margin: 24px auto !important;
}

body .eckb-kb-block-search #epkb-ml__module-search {
    padding-top: 20px !important;
    padding-bottom: 24px !important;
    border-radius: 20px;
}

body .eckb-kb-block-search #epkb-ml__module-search #epkb-ml-search-classic-layout .epkb-ml-search-title {
    font-size: 30px !important;
}

body .eckb-kb-block-search #epkb-ml__module-search #epkb-ml-search-classic-layout #epkb-ml-search-form {
    margin-top: 14px;
}

body .eckb-kb-block-search #epkb-ml__module-search #epkb-ml-search-classic-layout .epkb-ml-search-input-height--large #epkb-ml-search-box {
    height: 52px !important;
}

@media (max-width: 575.98px) {
    body .eckb-kb-block-search #epkb-ml__module-search #epkb-ml-search-classic-layout #epkb-ml-search-form #epkb-ml-search-box .epkb-ml-search-box__input {
        padding-inline: 12px !important;
    }
}
