/*
 * CSS Overrides for Standard Salesforce Knowledge Components used for all pages and included via
 * Experience Builder > Settings > Advanced > Edit Head Markup as there currently is no other way
 * of changing styles of this components.
 *
 * BUT there are also overrides regarding the Standard Salesforce Knowledge components in other
 * files.
 */

/*
 * Trending Articles e.g. standard Case Deflection component
 */

.selfServiceTopicTrendingArticles42 .slds-grid--vertical community_article-topic-trending-articles-item a:focus,
*:focus {
    /* Remove the border around an article of list if if gets focused */
    box-shadow: none !important;
}

.selfServiceTopicTrendingArticles42 h2 {
    margin-right: 0;
    padding: 0.5vw 1vw 0.5vw 1vw;
    font-family: OTTOsansboldwoff;
}

.selfServiceTopicTrendingArticles42 ul {
    padding: 0 1vw 1.5vw 1vw;
}

/*
 * Align Trending Articles and Case Deflection list link behaviour.
 * This styles are applied to the initial list of trending articles of the Case Deflection component.
 */

.comm-topic-trending-articles.selfServiceTopicTrendingArticles42 .slds-grid--vertical a {
    text-decoration: none;
}

.comm-topic-trending-articles.selfServiceTopicTrendingArticles42 .slds-grid--vertical a:hover,
.comm-topic-trending-articles.selfServiceTopicTrendingArticles42 .slds-grid--vertical a:focus,
.comm-topic-trending-articles.selfServiceTopicTrendingArticles42 .slds-grid--vertical a:active {
    color: var(--lwc-colorBrand);
    text-decoration: none;
}

.selfServiceTopicTrendingArticles42 community_article-topic-trending-articles-item a span lightning-formatted-date-time {
    /* Hide article creation date in the Case Deflection articles list */
    display: none;
}

/* TODO: Remove this, seems deprecated there is no page with a selector of .comm-page-custom-helpdesk1 */
.comm-page-custom-helpdesk1 .body .siteforceContentArea .slds-grid.slds-wrap.slds-medium-nowrap.slds-large-nowrap .slds-col--padded.slds-size--12-of-12.slds-medium-size--4-of-12.slds-large-size--4-of-12.comm-layout-column [data-region-name="sidebar"] {
    background-color: #eee;
    border: 1px solid #c4c4c4;
    padding: 12px 0px;
    height: 100%;
}

/* Only applies to the topic page because of the selector .comm-page-topic */
.comm-page-topic .selfServiceTopicTrendingArticles42 h2 {
    background-color: #eee;
    border: solid 1px #c4c4c4;
    border-bottom: 0;
    margin-right: 0;
    padding: 1vw 1vw 0.5vw 1vw;
    font-family: OTTOsansboldwoff;
}

/* Only applies to the topic page because of the selector .comm-page-topic */
.comm-page-topic .selfServiceTopicTrendingArticles42 ul {
    background-color: #eee;
    border: solid 1px #c4c4c4;
    border-top: 0;
    padding: 0 1vw 1.5vw 1vw;
}

/*
 * Align Trending Articles and Case Deflection list link behaviour.
 * This styles are applied to the results list if a "e.selfService:caseCreateFieldChange" is triggered
 * and the Case Deflection component updates the articles it displays.
 */

.caseDeflectionList community_case-case-deflection-item ul.slds-list_horizontal.slds-has-dividers_left.slds-text-color_weak {
    display: none;
}

.caseDeflectionList .caseDeflectionListItem .comm-case-deflection__item a:hover,
.caseDeflectionList .caseDeflectionListItem .comm-case-deflection__item a:focus,
.caseDeflectionList .caseDeflectionListItem .comm-case-deflection__item a:active,
.caseDeflectionList .caseDeflectionListItem a:hover,
.caseDeflectionList .caseDeflectionListItem a:focus,
.caseDeflectionList .caseDeflectionListItem a:active {
    color: var(--lwc-colorBrand);
    text-decoration: none;
}

/*
 * Similar Articles e.g. related articles component on Article Detail page
 */

.selfServiceSimilarArticles42 h2 {
    background-color: #F6F6F6;
    border: none;
    font-family: OTTOsansboldwoff;
    margin: 0;
    padding-left: var(--lwc-spacingMedium, 1rem);
    padding-right: var(--lwc-spacingMedium, 1rem);
    padding-bottom: var(--lwc-spacingXSmall, 0.5rem);
    padding-top: var(--lwc-spacingXLarge, 2rem);
}

.selfServiceSimilarArticles42 ul {
    background-color: #F6F6F6;
    border: none;
    margin: 0;
    padding-left: var(--lwc-spacingMedium, 1rem);
    padding-right: var(--lwc-spacingMedium, 1rem);
    padding-bottom: var(--lwc-spacingMedium, 1rem);
    padding-top: var(--lwc-spacingXSmall, 0.5rem);
}

.selfServiceSimilarArticles42 a {
    font-size: 14px !important;
    text-decoration: underline !important;
    border-bottom: 0 !important;
    padding: 8px 0;
}

.selfServiceSimilarArticles42 a span {
    font-size: 14px !important;
}

.selfServiceSimilarArticles42 li>.comm-related-articles__item>a:focus {
    box-shadow: none !important;
}

.comm-related-articles__item>div {
    display: none !important;
}


/*
 * Article Details
 */

article.content .forcePageBlockSectionRow ~ .forcePageBlockSectionRow,
.test-id__field-label,
.forceKnowledgeArticleThumbVote,
.forceKnowledgeArticleThumbVote>div>div:first-of-type>div,
h2.selfServiceArticleHeaderDetail {
    display: none !important;
}

.selfServiceArticleLayout article.summary h1 {
    color: #222;
    font-family: 'OTTOsansboldwoff';
    font-size: 18px !important;
    font-weight: bold;
    height: 18px;
    letter-spacing: 0;
    line-height: 18px;
}

.forceKnowledgeArticleThumbVote .slds-button--icon-border.slds-is-selected {
    background-color: rgb(212, 2, 29) !important;
    border-color: rgb(212, 2, 29) !important;
}

.forceKnowledgeArticleThumbVote .slds-button--icon-border.slds-not-selected:hover {
    color: rgb(212, 2, 29) !important;
}

.forceKnowledgeArticleThumbVote>div>div:first-of-type::before {
    content: "War dieser Beitrag hilfreich?";
}

.article-column,
.voting .slds-box--x-small {
    padding: 0 !important;
}

.selfServiceArticleLayout .slds-form-element_readonly {
    border: none;
}

.voting .forceKnowledgeArticleThumbVote .slds-card {
    background-color: #F6F6F6;
    border-left: none;
    border-right: none;
}

.voting .forceKnowledgeArticleThumbVote .slds-card .slds-box--x-small {
    display: flex;
}

.voting .forceKnowledgeArticleThumbVote .slds-card .slds-box--x-small .slds-card__body {
    margin: auto 0;
    font-size: 14px;
}

.voting .forceKnowledgeArticleThumbVote .slds-card .slds-box--x-small .slds-text-align--center {
    margin: 0 !important;
}

.voting .forceKnowledgeArticleThumbVote .slds-card .slds-box--x-small .slds-card__body .slds-button_icon-border {
    width: 40px;
    height: 36px;
}

.voting .forceKnowledgeArticleThumbVote .slds-card .slds-box--x-small .slds-card__body .slds-button__icon {
    fill: #222;
    width: 16px;
    height: 16px;
}

.voting .forceKnowledgeArticleThumbVote .slds-card .slds-box--x-small .slds-card__body .slds-p-top--xx-small {
    margin-top: 6px;
}

.voting .slds-button_icon-border.slds-is-selected {
    background-color: transparent;
    border-color: transparent;
}

.voting button {
    border: none;
}
