/*
Theme Name: LMSA
Description: Wordpress theme for Latvijas Multiplās sklerozes centrs
Author: Incate
Template: flatsome
Version: 1.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

/*====================== General =============================*/

:root {
    /* Primary colors */
    --lmsa-brand-primary: var(--fs-color-primary);
    --lmsa-brand-secondary: var(--fs-color-secondary);

    /* Additional colors derived from old design */
    --lmsa-brand-gray: #5e5e5e;
    --lmsa-background-dark: #474d3e;
    --lmsa-soft-orange: #f68d3a;
    --lmsa-dark-green: #5b9719;
    --lmsa-link-color: var(--fs-experimental-link-color);
    --lmsa-link-color-hover: var(--fs-experimental-link-color-hover);
    --lmsa-light-gray: rgba(17, 17, 17, 0.12);
    
    --lmsa-cmplz-font-size: 14px;
}

.lmsa-image-center,
.image-center,
.image-centered {
    margin-inline: auto;
}

p a {
    text-decoration: underline;
}

a:hover {
    color: var(--lmsa-link-color-hover);
}

blockquote, dl, figure, form, ol, p, pre, ul {
    margin-bottom: 1rem;
}

.page-inner ul li, .page-inner ol li {
    margin-left: 1.5rem;
}

.page-inner ul ul {
    list-style: circle;
}

.page-inner ul ul ul {
    list-style: square;
}

@media(max-width: 849px) {
    .mfp-container .mobile-sidebar .sidebar-menu {
        padding-top: 0;
    }
}

/*----------------- Text sizes -------------------*/
html.text-size-regular {
    font-size: 100%;
    --lmsa-font-scale: 1;
}

html.text-size-large {
    font-size: 125%;
    --lmsa-font-scale: 1.25;
}

html.text-size-larger {
    font-size: 150%;
    --lmsa-font-scale: 1.5;
}

html.text-size-larger #top-bar {
    min-height: 60px;
}

/*====================== Complianz cookie banner =============================*/

#cmplz-cookiebanner-container * {
    white-space: normal;
}

#cmplz-cookiebanner-container .cmplz-btn {
    height: auto;
}

html.text-size-regular #cmplz-cookiebanner-container,
html.text-size-large #cmplz-cookiebanner-container,
html.text-size-larger #cmplz-cookiebanner-container {
    --cmplz_title_font_size: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale));
    --cmplz_text_font_size: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale));
    --cmplz_link_font_size: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale));
    --cmplz_category_header_title_font_size: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale));
    --cmplz_category_body_font_size: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale));
    --cmplz_category_header_active_font_size: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale));
    --cmplz_button_font_size: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale));
}

html.text-size-large #cmplz-cookiebanner-container *,
html.text-size-larger #cmplz-cookiebanner-container * {
    line-height: calc(var(--lmsa-cmplz-font-size) * var(--lmsa-font-scale) * 1.1);
}


/*----------------- Complianz document -------------------*/

html.text-size-regular #cmplz-document,
html.text-size-large #cmplz-document,
html.text-size-larger #cmplz-document {

}


/*====================== Text size changer =============================*/
.text-size-changer {
    display: flex;
    align-items: flex-end;
}

.text-size-changer .text-size-text {
    line-height: 1;
    font-size: 1rem;
}

.text-size-changer .text-size-btn {
    margin: 0;
    padding: 0;
    min-height: unset;
}

.text-size-changer .text-size-btn[data-size="regular"] {
    font-size: 1rem;
    line-height: 1rem;
}

.text-size-changer .text-size-btn[data-size="large"] {
    font-size: 1.25rem;
    line-height: 1.25rem;

}

.text-size-changer .text-size-btn[data-size="larger"] {
    font-size: 1.5rem;
    line-height: 1.5rem;
    margin-left: 0.25rem;
}

.text-size-btn.is-active {
    font-weight: bold;
    text-decoration: underline;
}

.text-size-btn:hover {
    text-decoration: solid underline 4px;
}

@media (max-width: 849px) {
    .text-size-changer {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .text-size-changer .text-size-text {
    }
}

/*====================== Header =============================*/
#header .header-main {
    min-height: 72px;
    height: auto !important;
}

.header .header-inner {
    height: auto;
}

.header.show-on-scroll #masthead.header-main {
    height: auto;
}

.header .header-top * {
    color: #ffffff;
}

#header .header-nav {
    justify-content: space-evenly;
}

.header-top .reading-program {
    font-size: 1rem;
}

.header-top .reading-program a:hover {
    text-decoration: underline;
}

.mfp-container .custom {
    justify-content: center;
}

/*====================== Sidebar =============================*/
@media (min-width: 850px) {
    .page-right-sidebar .sidebar-wrapper {
        position: sticky;
        top: 120px;
        align-self: flex-start;
    }

    body:has(#header .stuck) .page-right-sidebar .sidebar-wrapper {
        top: 160px;
    }
}

@media (min-width: 850px) and (max-width: 1199px) {
    .page-right-sidebar .sidebar-wrapper {
        top: 225px;
    }

    body:has(#header .stuck) .page-right-sidebar .sidebar-wrapper {
        top: 180px;
    }
}

/*----------------- Menu -------------------*/

.lmsa-section-sidebar {
    margin-bottom: 2rem;
}

.lmsa-section-sidebar__nav,
.lmsa-section-sidebar__children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lmsa-section-sidebar__item {
    margin: 0;
}

.lmsa-section-sidebar__item + .lmsa-section-sidebar__item {
    border-top: 1px solid var(--lmsa-light-gray);
}

.lmsa-section-sidebar__link {
    display: block;
    position: relative;
    padding: 0.75rem 0;
    font-size: 0.8em;
    color: inherit;
    text-decoration: none;
}

.lmsa-section-sidebar__link:hover {
    color: var(--lmsa-brand-secondary) !important;
}

.lmsa-section-sidebar__item.active > .lmsa-section-sidebar__link,
.lmsa-section-sidebar__link.is-current {
    font-weight: 700;
}

.lmsa-section-sidebar__children {
    display: block !important;
    position: static;
    left: auto;
    visibility: visible;
    opacity: 1;
    max-height: none;
    width: 100%;
    padding-bottom: 0.75rem;
    border-right: none !important;
    box-shadow: none !important;
    padding-left: 0.85rem;
}

.lmsa-section-sidebar__item.lmsa-section-sidebar__item--expanded > .lmsa-section-sidebar__children {
    display: block !important;
}


.lmsa-section-sidebar__children .lmsa-section-sidebar__link {
    padding: 0.6rem 0.75rem 0.6rem 0;
    font-size: 0.8em;
    border-right: none !important;
    box-shadow: none !important;
}

.lmsa-section-sidebar__children .lmsa-section-sidebar__link::before {
    content: none !important;
    display: none !important;
}

.lmsa-section-sidebar__children .lmsa-section-sidebar__item + .lmsa-section-sidebar__item {
    border-top: 1px solid var(--lmsa-light-gray);
}

.lmsa-section-sidebar__children .lmsa-section-sidebar__item {
    border-right: none !important;
    box-shadow: none !important;
}

.lmsa-section-sidebar__children .lmsa-section-sidebar__item.current_page_item > .lmsa-section-sidebar__link {
    border-right: none !important;
    box-shadow: inset -3px 0 0 var(--fs-color-primary);
}

/*----------------- Poll -------------------*/

.widget-area .widget_yop_poll_widget .widget-title {
    color: #000000;
    font-size: 1.25rem;
}

.widget-area .widget_yop_poll_widget .is-divider {
    display: none;
}

.widget-area .yop-poll-vote-button {
    margin: 0;
}

.widget-area .widget_yop_poll_widget .yop-poll,
.widget-area .widget_yop_poll_widget .yop-poll-question,
.widget-area .widget_yop_poll_widget .yop-poll-answer-text,
.widget-area .widget_yop_poll_widget .yop-poll-vote-button,
.widget-area .widget_yop_poll_widget .yop-poll-result-text,
.widget-area .widget_yop_poll_widget .yop-poll-dropdown,
.widget-area .widget_yop_poll_widget .yop-poll-question font {
    font-size: inherit !important;
}

.widget-area .widget_yop_poll_widget .yop-poll-question font {
    line-height: inherit;
}

.widget-area .yop-poll-answer input[type="checkbox"]:focus-visible {
    outline: 2px auto #000000;
}

.widget-area .yop-poll-vote-button:focus-visible {
    outline: 2px auto #000000;
}

/*====================== Glossary =============================*/
.glossary-item {
    margin-bottom: 1rem;

}

.glossary-filter-btn {
    border-radius: 0.5rem;
    transition: none;
}

.glossary-filter-btn.is-active {
    box-shadow: inset 0 0 0 2px #000000;
    background-color: var(--fs-color-primary);
    background-color: color-mix(in srgb, var(--fs-color-primary) 50%, transparent);
}

.glossary-filter-btn:hover {
    background-color: var(--fs-color-primary);
    color: #ffffff;

}

/*====================== Branches table =============================*/
.lmsa-branches-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border: 1px solid var(--lmsa-light-gray);
    background-color: #ffffff;
}

.lmsa-branches-table th,
.lmsa-branches-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--lmsa-light-gray);
    text-align: left;
    vertical-align: top;
}

.lmsa-branches-table thead th {
    background-color: var(--lmsa-brand-primary);
    color: #ffffff;
    font-weight: 700;
}

.lmsa-branches-table tbody tr:nth-child(even) {
    background-color: rgba(17, 17, 17, 0.02);
}

.lmsa-branches-table a {
    text-decoration: underline;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 767px) {
    .lmsa-branches-table,
    .lmsa-branches-table tbody,
    .lmsa-branches-table tr,
    .lmsa-branches-table th,
    .lmsa-branches-table td {
        display: block;
        width: 100%;
    }

    .lmsa-branches-table {
        border: none;
        background-color: transparent;
    }

    .lmsa-branches-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .lmsa-branches-table tbody tr {
        margin-bottom: 1rem;
        border: 1px solid var(--lmsa-light-gray);
        background-color: #ffffff;
    }

    .lmsa-branches-table tbody tr:nth-child(even) {
        background-color: #ffffff;
    }

    .lmsa-branches-table tbody th[scope="row"] {
        padding: 0.875rem 1rem;
        border: none;
        border-bottom: 1px solid var(--lmsa-light-gray);
        background-color: var(--lmsa-brand-primary);
        color: #ffffff;
        font-size: 1rem;
        line-height: 1.3;
    }

    .lmsa-branches-table tbody td {
        display: grid;
        grid-template-columns: minmax(6.5rem, 40%) 1fr;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        border: none;
        border-top: 1px solid var(--lmsa-light-gray);
    }

    .lmsa-branches-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--lmsa-brand-gray);
    }

    .lmsa-branches-table tbody td:empty::before {
        content: attr(data-label);
    }

    .lmsa-branches-table tbody td > * {
        min-width: 0;
    }
}

/*====================== Home Page =============================*/

.home-post-slider .flickity-slider .col {
    min-height: 270px;
    height: 270px;
    padding-bottom: 0;
}

.home-post-slider .flickity-slider > .col > .col-inner,
.home-post-slider .flickity-slider > .col > .col-inner > .box,
.home-post-slider .flickity-slider > .col > .col-inner .box-text,
.home-post-slider .flickity-slider > .col > .col-inner .box-text-inner {
    height: 100%;
}

/*====================== Random specific changes =============================*/

.row:has(>.page-col) {
    justify-content: center;
}

.page-col .col-inner,
.page-col .col-inner > .block,
.page-col .col-inner > .block > .page-box,
.page-col .col-inner > .block > .page-box > .box-text {
    height: 100%;
}

.page-col .box-image {
    display: none;
}

.page-col .box-text {
    height: 100%;
    display: flex;
    align-items: center;
    top: -10px;
    background-color: var(--lmsa-dark-green);
}

.page-col .block:hover {
    color: unset;
}

.useful-resources-accordion p {
    margin-bottom: 0.5rem;
}

.useful-resources-accordion p:last-child {
    margin-bottom: 0;
}

.useful-resources-accordion .accordion-inner a {
    text-decoration: underline;
}

.history-anchor-bar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    border-bottom: 1px solid var(--lmsa-light-gray);
    margin-bottom: 1rem;
}

.history-anchor-bar .ux-menu-link {
    color: var(--lmsa-link-color);
}

.history-anchor-bar .ux-menu-link:not(:last-child) span {
    padding-right: 1rem;
    border-right: 1px solid var(--lmsa-light-gray);
}

.history-anchor-bar .ux-menu-link:hover a {
    text-decoration: underline;
    color: var(--lmsa-link-color-hover);
}


a.lightbox-gallery:focus-visible,
a.image-lightbox:focus-visible {
    outline: 2px auto #000000;
}

header.entry-header {
    margin-bottom: 1.5rem;
}

h1.entry-title {
    margin-bottom: 0.25rem;
}

.rank-math-breadcrumb {
    font-size: 0.875rem;
}

/*====================== Posts =============================*/
.blog-archive .post .entry-header-text {
    padding-bottom: 0;
}

.blog-archive .entry-image {
    display: flex;
    justify-content: center;
}

.blog-archive .entry-image img {
    max-height: 250px;
    width: auto;
}

.blog-archive .entry-meta {
    margin-bottom: 0.5rem;
}

.blog-archive .entry-meta > a {
    border: 2px solid var(--lmsa-brand-primary);
    padding: 0.25rem;
}

.blog-archive .entry-title > a {
    transition: color 0.2s ease;
}

.blog-archive .post .entry-header:has(.entry-image) {
    margin-bottom: 0;
}


.blog-archive .post .entry-content {
    padding-top: 0;
}

.single-post .blog-single article:not(.category-jaunumi) .entry-header-text {
    text-align: left;
    padding-left: 0;
    padding-bottom: 0;
}
