/* Общие правила движка, которые нужны любому шаблону: текст, цвета, фоны секций, переключатель языка, поиск, прелоадер.
   Выбраны из common/public/css/index/layout.css без шапки, подвала, области и заголовка страницы — их задаёт шаблон
   (shared/css/header|footer|template). Пересобирать вместе с runtime: php dev/sync-base-css.php. */

/* region common rules */


body {
    font-family: var(--font-family-default);
    font-weight: 300;
    font-size: var(--font-size-main);
    line-height: 24px;
    background: var(--basic-background-color);
    color: var(--primary-text-color);
}




a, .a {
    color: var(--accent-text-color);
}

input, select, textarea, .content-preview {
    color: var(--primary-text-color);
    border: 1px solid var(--control-border-color);
    background: var(--content-background-color);
}

input:focus, select:focus, textarea:focus {
    border: 1px solid var(--control-accent-border-color);
}

.content-preview {
    background: var(--content2-background-color);
}

.divider {
    border-top: 1px solid var(--content-border-color);
}

.form-error-details, .form-errors-wrap {
    display: none;
}

.error-message, .warning-message {
    color: var(--warn-text-color);
}
/* endregion common rules */

/* region text */
.text-primary {
    color: var(--primary-text-color) !important;
}

.text-secondary {
    font-size: 13px;
    color: var(--secondary-text-color) !important;
}
/* endregion text */

/* region colors */
.primary-color {
    color: var(--primary-text-color) !important;
}

.secondary-color {
    color: var(--secondary-text-color) !important;
}

.accent-color {
    color: var(--accent-text-color) !important;
}

.disabled-color {
    color: var(--disabled-text-color) !important;
}

.warn-color {
    color: var(--warn-text-color) !important;
}

.highlight-color {
    color: var(--highlight-text-color) !important;
}
/* endregion colors */

/* region backgrounds */
.primary-background {
    background: var(--primary-background-color) !important;
}

.basic-background {
    background: var(--basic-background-color) !important;
}

.accent-background {
    background: var(--accent-background-color) !important;
}

.disabled-background {
    background: var(--disabled-background-color) !important;
}

.warn-background {
    background: var(--warn-background-color) !important;
}

.highlight-background {
    background: var(--highlight-background-color) !important;
}
/* endregion backgrounds */

/* region color-style */
.primary-style-colors {
    background: var(--primary-background-color) !important;
    color: var(--white-text-color) !important;
}

.accent-style-colors {
    background: var(--accent-background-color) !important;
    color: var(--white-text-color) !important;
}

.warn-style-colors {
    background: var(--warn-background-color) !important;
    color: var(--white-text-color) !important;
}

.grey-style-colors {
    background: var(--content3-background-color) !important;
    color: var(--content-text-color) !important;
}

.primary-light-style-colors {
    background: var(--primary-light-background-color) !important;
    color: var(--primary-light-text-color) !important;
}

.accent-light-style-colors {
    background: var(--accent-light-background-color) !important;
    color: var(--accent-light-text-color) !important;
}

.warn-light-style-colors {
    background: var(--warn-light-background-color) !important;
    color: var(--warn-light-text-color) !important;
}
/* endregion color-style */

/* region section */
.section-title {
    color: var(--primary-text-color);
    margin: 28px 0;
}

.section-title i {
    color: var(--icon-color);
    margin-right: 8px;
}

.section-title.with-link {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.section-title.with-link a {
    text-decoration: none;
    color: var(--accent-text-color);
}

.section-description {
    font-size: 16px;
    line-height: 21px;
    margin: 10px 0 20px 0;
}

#main-content > .page-wrapper > .content-card {
    margin-bottom: 0;
    overflow: hidden;
}

/*#main-content > .page-wrapper > .content-card > .content-wrapper > section {*/
/*    margin: 0 -40px;*/
/*    padding: 40px;*/
/*}*/

/*#main-content > .page-wrapper > .content-card > .content-wrapper > section:first-child {*/
/*    margin-top: -40px;*/
/*}*/

/*#main-content > .page-wrapper > .content-card > .content-wrapper > section:last-child {*/
/*    margin-bottom: -40px;*/
/*}*/

#main-content > .page-wrapper > .content-card > .content-wrapper > section > .page-wrapper {
    width: 100%;
    max-width: initial;
    min-width: initial;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .section-top-content {
    font-size: 16px;
    line-height: 21px;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .section-bottom-content {
    font-size: 16px;
    line-height: 21px;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .grid-columns.grid-columns-wo-gap {
    gap: 0;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .grid-columns > .custom-block-item {
    height: 100%;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .grid-columns > .custom-block-item-with-bg {
    padding: 32px;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .section-top-content h2,
#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .section-top-content h2 {
    color: var(--primary-text-color);
    margin: 28px 0;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block .grid-columns > .custom-block-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block.custom-block-with-image .grid-columns > .custom-block-item-content {
    order: 1;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block.custom-block-with-image .grid-columns > .custom-block-item-image-left {
    order: 0;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block.custom-block-with-image .grid-columns > .custom-block-item-image-right {
    order: 2;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block.custom-block-with-image .grid-columns > .custom-block-item-image {
    padding: 0;
    min-height: 100%;
}

#main-content > .page-wrapper > .content-card > .content-wrapper > section.custom-block.custom-block-with-image .grid-columns > .custom-block-item-image img {
    height: 100%;
    width: 100%;
    object-position: center;
}
/* endregion section */

/* region lang-widget */
#header .lang-widget i {
    font-size: 20px;
}

#header .lang-widget .lang-widget-current-title {
    font-size: 14px;
    line-height: 14px;
}

#header .lang-widget img.country-flag {
    height: 20px;
    margin-bottom: 3px;
}

#header .lang-widget .lang-widget-current-title {
    display: none;
}
/* endregion lang-widget */

/* region searchbox */
/* header searchbox */
#header-nav-1 .search-box {
    padding-right: 10px;
}

#search-box {
    position: relative;
    display: flex;
    flex-direction: row;
    width: 43px;
    overflow: hidden;
}

#search-box.active {
    width: auto;
    overflow: visible;
}

#search-box #form-search {
    display: none;
    position: relative;
}

#search-box.active #form-search {
    display: flex;
}

#search-box.active #search-show {
    display: none;
}

#search-box i {
    color: var(--icon-color);
}

#search-box button {
    background: none;
    padding: 0 10px;
    margin: 0;
    box-shadow: none;
    min-height: auto;
    cursor: pointer;
    position: relative;
    min-width: 41px;
}

#search-box button:hover:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 100%;
    background: var(--hover-background-color);
}

#search-box input {
    background: none;
    border: none;
    outline: none;
    display: block;
    width: 400px;
    color: var(--white-text-color);
    line-height: 14px;
    min-height: auto;
}

#search-box #form-search #search-results-box {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    z-index: 1;
    background: var(--content-background-color);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px;
    color: var(--dropdown-text-color);
    border-radius: 8px;
    width: 100%;
}

#search-box #form-search.initialized #search-results-box {
    display: block;
}

#search-box #form-search #search-results-box ul {
    display: block;
    position: static;
    background: none;
    box-shadow: none;
    color: inherit;
    padding: 0;
    border-bottom: 1px solid var(--content-border-color);
}

#search-box #form-search #search-results-box ul li.selected {
    background: var(--hover2-background-color);
}

#search-box #form-search #search-results-box ul li a {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
}

#search-box #form-search #search-results-box ul li a span {
    padding: 0;
}

#search-box #form-search #search-results-box ul li .item-name {
    width: 100%;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

#search-box #form-search #search-results-box ul li .item-price {
    width: 100px;
    flex-shrink: 0;
    padding-left: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#search-box #form-search #search-results-box .link {
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 0;
}

#search-box #form-search #search-results-box .link:hover:after{
    display: none;
}

#search-box #form-search #search-results-box .link i {
    margin-left: 10px;
    vertical-align: middle;
}

#search-box #form-search #search-results-box .tip {
    min-height: 48px;
    font-size: 16px;
    padding: 0 16px;
    line-height: 48px;
    border-bottom: 1px solid var(--content-border-color);
}

#search-box #form-search #search-results-box .tip.error {
    color: var(--warn-text-color);
    font-weight: 500;
}

#search-box #form-search #search-results-box .tip.preloader {
    position: relative;
    padding-left: 48px;
}

#search-box #form-search #search-results-box .tip.preloader:before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    display: block;
    border: 3px solid var(--primary-background-color);
    border-bottom: none;
    border-radius: 100%;
    animation: preloader 1.2s linear infinite;
}
/* endregion searchbox */

/* region preloader */
.preloading {
    position: relative;
    min-height: 40px;
}

.preloading:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    border: 3px solid var(--primary-background-color);
    border-bottom: none;
    border-radius: 100%;
    width: 40px;
    height: 40px;
    animation: preloader 1.2s linear infinite;
}

@keyframes preloader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* endregion preloader */
