/* Theme mode styles */
:root {
    --mode-page-bg: var(--white-color);
    --mode-surface-bg: var(--main-background-light-blue-color);
    --mode-panel-bg: #f4f6fc;
    --mode-contrast-bg: #3d3e51;
    --mode-overlay-bg: rgba(61, 62, 81, .86);
    --mode-image-overlay-color: #3d3e51;
    --mode-image-blend: multiply;
    --mode-image-overlay-opacity: .93;
    --mode-border-color: var(--accent-and-border-light-blue-color);
}

.theme-toggle {
    --theme-toggle-bg: var(--main-background-light-blue-color);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--theme-toggle-bg);
    color: var(--main-dark-blue-color);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    cursor: pointer;
    transition: background .32s ease, color .25s ease;
}

.theme-toggle:hover {
    --theme-toggle-bg: var(--white-color);
    color: var(--main-orange-color);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--main-orange-color);
    outline-offset: 2px;
}

.theme-toggle__icon {
    width: 18px;
    height: 18px;
    position: relative;
    display: block;
    z-index: 1;
    transition: transform .32s ease;
}

.theme-toggle__icon::before,
.theme-toggle__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition:
        transform .32s ease,
        opacity .22s ease,
        box-shadow .32s ease,
        background-color .32s ease,
        color .32s ease;
}

.theme-toggle__icon::before {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}

.theme-toggle__icon::after {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: currentColor;
    box-shadow:
        0 -8px 0 0 currentColor,
        0 8px 0 0 currentColor,
        8px 0 0 0 currentColor,
        -8px 0 0 0 currentColor,
        5.7px 5.7px 0 0 currentColor,
        -5.7px -5.7px 0 0 currentColor,
        5.7px -5.7px 0 0 currentColor,
        -5.7px 5.7px 0 0 currentColor;
}

.theme-toggle__auto {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    margin-left: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-toggle-bg);
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0;
    transform: scale(.82);
    transition: opacity .22s ease, transform .32s ease;
    pointer-events: none;
}

.theme-toggle[data-theme-setting="auto"] .theme-toggle__icon::before {
    width: 12px;
    height: 12px;
}

.theme-toggle[data-theme-setting="auto"] .theme-toggle__icon::after {
    background: transparent;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.theme-toggle[data-theme-setting="auto"] .theme-toggle__auto {
    opacity: 1;
    transform: scale(1);
    animation: theme-toggle-auto-letter .46s cubic-bezier(.2, .8, .2, 1);
}

.theme-toggle[data-theme-setting="dark"] .theme-toggle__icon::after {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.35);
}

.theme-toggle[data-theme-setting="dark"] .theme-toggle__icon::before {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: currentColor;
    -webkit-mask: radial-gradient(circle at 68% 32%, transparent 41%, #000 42%);
    mask: radial-gradient(circle at 68% 32%, transparent 41%, #000 42%);
}

.theme-toggle[data-theme-setting="dark"] .theme-toggle__auto {
    opacity: 0;
}

.theme-toggle[data-theme-setting="light"] .theme-toggle__icon,
.theme-toggle[data-theme-setting="auto"] .theme-toggle__icon {
    transform: rotate(0);
}

.theme-toggle[data-theme-setting="light"] .theme-toggle__icon {
    animation: theme-toggle-morph-light .52s cubic-bezier(.22, .68, .2, 1);
}

.theme-toggle[data-theme-setting="auto"] .theme-toggle__icon {
    animation: theme-toggle-morph-auto .52s cubic-bezier(.22, .68, .2, 1);
}

.theme-toggle[data-theme-setting="light"] .theme-toggle__icon::after,
.theme-toggle[data-theme-setting="auto"] .theme-toggle__icon::after {
    animation: theme-toggle-rays-appear .42s ease;
}

.theme-toggle[data-theme-setting="dark"] .theme-toggle__icon {
    transform: rotate(-10deg);
    animation: theme-toggle-morph-dark .52s cubic-bezier(.22, .68, .2, 1);
}

@keyframes theme-toggle-morph-light {
    0% {
        transform: rotate(-14deg) scale(.86);
    }
    58% {
        transform: rotate(8deg) scale(1.11);
    }
    100% {
        transform: rotate(0) scale(1);
    }
}

@keyframes theme-toggle-morph-dark {
    0% {
        transform: rotate(0) scale(.9);
    }
    58% {
        transform: rotate(-24deg) scale(1.12);
    }
    100% {
        transform: rotate(-10deg) scale(1);
    }
}

@keyframes theme-toggle-morph-auto {
    0% {
        transform: rotate(-6deg) scale(.9);
    }
    58% {
        transform: rotate(10deg) scale(1.11);
    }
    100% {
        transform: rotate(0) scale(1);
    }
}

@keyframes theme-toggle-rays-appear {
    0% {
        transform: translate(-50%, -50%) scale(.42) rotate(-40deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes theme-toggle-auto-letter {
    0% {
        opacity: 0;
        transform: scale(.55);
    }
    65% {
        opacity: 1;
        transform: scale(1.13);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle,
    .theme-toggle__icon,
    .theme-toggle__icon::before,
    .theme-toggle__icon::after,
    .theme-toggle__auto {
        transition: none;
    }

    .theme-toggle[data-theme-setting="light"] .theme-toggle__icon,
    .theme-toggle[data-theme-setting="auto"] .theme-toggle__icon,
    .theme-toggle[data-theme-setting="dark"] .theme-toggle__icon,
    .theme-toggle[data-theme-setting="light"] .theme-toggle__icon::after,
    .theme-toggle[data-theme-setting="auto"] .theme-toggle__icon::after,
    .theme-toggle[data-theme-setting="auto"] .theme-toggle__auto {
        animation: none;
    }
}

body input[type=search] {
    border-color: var(--mode-border-color);
}

.select2-container--default .select2-selection--single {
    background-color: var(--100-percent-transparent-white-color);
    border: 1px solid var(--mode-border-color);
}

.select2-dropdown {
    border-color: var(--mode-border-color);
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--main-dark-blue-color);
}

html.theme-dark {
    --mode-page-bg: #0f1422;
    --mode-page-bg-transparent: rgba(15, 20, 34, 0);
    --mode-surface-bg: #19233a;
    --mode-panel-bg: #202d46;
    --mode-contrast-bg: #2b3955;
    --mode-overlay-bg: rgba(5, 8, 14, .86);
    --mode-image-overlay-color: var(--dark-contrast-bg);
    --mode-image-blend: multiply;
    --mode-image-overlay-opacity: .93;
    --mode-border-color: #313d5b;
    --main-dark-blue-color: #e8ecff;
    --70-percent-transparent-main-dark-blue-color: rgba(15, 20, 34, .7);
    --main-blue-color: #a0abcf;
    --main-background-light-blue-color: var(--mode-surface-bg);
    --accent-and-border-light-blue-color: var(--mode-border-color);
    /* compatibility aliases */
    --dark-contrast-bg: var(--mode-contrast-bg);
    --dark-page-bg-transparent: var(--mode-page-bg-transparent);
}

html.theme-dark body {
    background-color: var(--mode-page-bg);
    color: var(--main-dark-blue-color);
}

html.theme-dark .header {
    border-bottom-color: var(--mode-border-color);
}

html.theme-dark .overlay {
    background: var(--mode-overlay-bg);
}

html.theme-dark body input,
html.theme-dark body textarea {
    border-bottom-color: var(--mode-border-color);
}

html.theme-dark body input[type=search] {
    border-color: var(--mode-border-color);
}

html.theme-dark .titlebar-info__bg,
html.theme-dark .post-title__bg,
html.theme-dark .mailing-section__bg,
html.theme-dark .practice-backcall__section--bg,
html.theme-dark .home-section__bg {
    overflow: hidden;
    isolation: isolate;
}

html.theme-dark .titlebar-info__bg::after,
html.theme-dark .post-title__bg::after,
html.theme-dark .mailing-section__bg::after,
html.theme-dark .practice-backcall__section--bg::after,
html.theme-dark .home-section__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--mode-image-overlay-color);
    mix-blend-mode: var(--mode-image-blend);
    opacity: var(--mode-image-overlay-opacity);
    pointer-events: none;
    z-index: 1;
}

@supports (mix-blend-mode: plus-darker) {
    html.theme-dark {
        --mode-image-blend: plus-darker;
        --mode-image-overlay-opacity: 1;
    }
}

html.theme-dark .breadcrumbs-wrap::after {
    background: linear-gradient(89.88deg, rgba(15, 20, 34, 0) .07%, var(--mode-page-bg) 99.22%);
}

html.theme-dark .breadcrumbs li:not(.current)::after {
    width: 6px;
    height: 6px;
    margin-left: 7px;
    background: none;
    border-top: 1px solid var(--main-dark-blue-color);
    border-right: 1px solid var(--main-dark-blue-color);
    transform: rotate(45deg);
}

html.theme-dark .header-menu,
html.theme-dark .footer,
html.theme-dark .custom-tooltip .tooltip-text,
html.theme-dark .case-item__info::before,
html.theme-dark .cookie-notice {
    background-color: var(--main-background-light-blue-color);
}

html.theme-dark .btn,
html.theme-dark .owl-nav>button,
html.theme-dark .pagination .page-numbers.next,
html.theme-dark .pagination .page-numbers.prev,
html.theme-dark .pagination .page-numbers.previous,
html.theme-dark .post-content .event_button,
html.theme-dark .cookie-button,
html.theme-dark .btn.secondary:hover {
    background-color: var(--mode-contrast-bg);
}

html.theme-dark .post-content .socials-item,
html.theme-dark .practice-backcall__section .socials-item,
html.theme-dark .share-links__item {
    background-color: var(--mode-contrast-bg);
}

html.theme-dark .btn {
    color: var(--white-color);
}

html.theme-dark .btn:hover,
html.theme-dark .btn:focus,
html.theme-dark .btn:active {
    background-color: var(--main-orange-color);
}

html.theme-dark .post-content .event_button:hover,
html.theme-dark .post-content .event_button:focus,
html.theme-dark .post-content .event_button:active {
    background-color: var(--main-orange-color);
}

html.theme-dark .btn-menu:hover,
html.theme-dark .btn-menu:focus,
html.theme-dark .btn-menu:active,
html.theme-dark .btn-menu.active:hover,
html.theme-dark .btn-menu.active:focus,
html.theme-dark .btn-menu.active:active {
    color: var(--white-color);
}

html.theme-dark .btn-menu.active {
    background: var(--mode-panel-bg);
    color: var(--main-dark-blue-color);
}

html.theme-dark .btn-menu.active .menu-icon span::after,
html.theme-dark .btn-menu.active .menu-icon span::before {
    background: var(--main-dark-blue-color);
}

html.theme-dark .btn-menu.active:hover .menu-icon span::after,
html.theme-dark .btn-menu.active:hover .menu-icon span::before,
html.theme-dark .btn-menu.active:focus .menu-icon span::after,
html.theme-dark .btn-menu.active:focus .menu-icon span::before {
    background: var(--white-color);
}

html.theme-dark .owl-nav>button:hover,
html.theme-dark .owl-nav>button:focus,
html.theme-dark .owl-nav>button:active {
    background-color: var(--main-orange-color);
}

html.theme-dark .pagination .page-numbers.next:hover,
html.theme-dark .pagination .page-numbers.prev:hover,
html.theme-dark .pagination .page-numbers.previous:hover,
html.theme-dark .pagination .page-numbers.next:focus,
html.theme-dark .pagination .page-numbers.prev:focus,
html.theme-dark .pagination .page-numbers.previous:focus {
    background-color: var(--main-orange-color);
}

html.theme-dark .post-content .socials-item:hover,
html.theme-dark .practice-backcall__section .socials-item:hover,
html.theme-dark .post-content .socials-item:focus,
html.theme-dark .practice-backcall__section .socials-item:focus,
html.theme-dark .share-links__item:hover,
html.theme-dark .share-links__item:focus {
    background-color: var(--main-orange-color);
}

html.theme-dark .custom-tooltip .tooltip-text::before {
    border-bottom-color: var(--main-background-light-blue-color);
}

html.theme-dark .cookie-notice {
    color: var(--main-dark-blue-color);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
}

html.theme-dark .cookie-link {
    color: var(--main-dark-blue-color);
}

html.theme-dark .cookie-link::after {
    border-bottom-color: var(--main-dark-blue-color);
}

html.theme-dark .cookie-button:hover {
    background: var(--main-orange-color);
}

html.theme-dark .fancybox-content {
    background: var(--mode-panel-bg);
    color: var(--main-dark-blue-color);
}

html.theme-dark .fancybox-is-open .fancybox-bg {
    background: var(--mode-overlay-bg);
}

html.theme-dark .modal .fancybox-close-small {
    filter: invert(1);
}

.fancybox-content .modal,
.fancybox-content .modal-inner {
    text-align: center;
}

html.theme-dark .header>.container .logo img {
    filter: brightness(0) invert(1);
}

html.theme-dark .profile-info__contacts a.phone::before,
html.theme-dark .profile-info__contacts a.mail::before,
html.theme-dark .contacts-box__item.phone::before,
html.theme-dark .contacts-box__item.mail::before,
html.theme-dark .contacts-box__item.address::before,
html.theme-dark .contacts-box__item.work-hours::before {
    filter: brightness(0) saturate(100%) invert(95%) sepia(10%) saturate(370%) hue-rotate(185deg) brightness(103%) contrast(101%);
}

html.theme-dark .profile-info__contacts a.phone:hover::before,
html.theme-dark .profile-info__contacts a.phone:focus::before,
html.theme-dark .profile-info__contacts a.mail:hover::before,
html.theme-dark .profile-info__contacts a.mail:focus::before,
html.theme-dark .contacts-box a.contacts-box__item.phone:hover::before,
html.theme-dark .contacts-box a.contacts-box__item.phone:focus::before,
html.theme-dark .contacts-box a.contacts-box__item.mail:hover::before,
html.theme-dark .contacts-box a.contacts-box__item.mail:focus::before {
    filter: brightness(0) saturate(100%) invert(45%) sepia(83%) saturate(4633%) hue-rotate(350deg) brightness(101%) contrast(101%);
}

html.theme-dark .footer-socials .socials-item {
    background-color: var(--white-color);
}

html.theme-dark .footer-socials .theme-toggle {
    --theme-toggle-bg: var(--white-color);
    background-color: var(--white-color);
    color: var(--mode-page-bg);
}

html.theme-dark .footer-socials .theme-toggle:hover,
html.theme-dark .footer-socials .theme-toggle:focus {
    --theme-toggle-bg: var(--main-orange-color);
    color: var(--white-color);
    background-color: var(--main-orange-color);
}

html.theme-dark .theme-auto-notice {
    background: var(--main-background-light-blue-color);
    color: var(--main-dark-blue-color);
    border-color: var(--mode-border-color);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
}

html.theme-dark .theme-auto-notice__ok {
    background: var(--mode-contrast-bg);
    color: var(--white-color);
}

html.theme-dark .theme-auto-notice__ok:hover,
html.theme-dark .theme-auto-notice__ok:focus {
    background: var(--main-orange-color);
    color: var(--white-color);
}

html.theme-dark .theme-auto-notice__switch {
    color: var(--main-dark-blue-color);
    border-bottom-color: var(--main-dark-blue-color);
}

html.theme-dark .partners-carousel {
    background: var(--main-dark-blue-color);
    padding: 10px;
    border-radius: 15px;
    overflow: hidden;
}

html.theme-dark .mailing-img::after {
    background: linear-gradient(to top, #1f3050, var(--100-percent-transparent-white-color) 100%);
}

html.theme-dark .service-item::after {
    background: linear-gradient(to top, var(--mode-page-bg) 0, var(--mode-page-bg-transparent) 100%);
}

html.theme-dark .about-map::before {
    background: linear-gradient(to bottom, var(--mode-page-bg) 0, var(--mode-page-bg-transparent) 100%);
}

html.theme-dark .about-map circle + text {
    fill: var(--mode-page-bg) !important;
}

html.theme-dark .about-map .about-map__city-bg {
    fill: var(--main-dark-blue-color);
    pointer-events: none;
}

html.theme-dark .feedback-item::after {
    border-bottom-color: var(--mode-page-bg);
}

html.theme-dark .loading::after {
    background: transparent;
}

html.theme-dark mark {
    background: var(--mode-contrast-bg);
    box-shadow: 0 5px 0 var(--mode-contrast-bg), 0 -1px 0 var(--mode-contrast-bg);
    color: var(--white-color);
}

html.theme-dark .select2-container--default .select2-selection--single .select2-selection__arrow {
    filter: invert(1);
}

html.theme-dark .select2-dropdown {
    background-color: var(--mode-panel-bg);
    border-color: var(--mode-border-color);
}

html.theme-dark .select2-results__option {
    color: var(--main-dark-blue-color);
}

html.theme-dark .select2-container--default .select2-results__option--selected {
    background-color: var(--main-background-light-blue-color);
}

html.theme-dark .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--mode-contrast-bg);
    color: var(--white-color);
}

html.theme-dark .select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: var(--mode-border-color);
    background: var(--100-percent-transparent-white-color);
    color: var(--main-dark-blue-color);
}

@media screen and (max-width:575px) {
    html.theme-dark .about-map__section ul li {
        background: var(--main-dark-blue-color);
        color: var(--mode-page-bg);
        border-radius: 16px;
        padding: 2px 10px;
        width: -moz-fit-content;
        width: fit-content;
        max-width: 100%;
        margin-bottom: 6px;
    }

    html.theme-dark .about-map__section ul li::before {
        background: var(--mode-page-bg);
        margin-right: 6px;
    }
}
