::-webkit-input-placeholder { /* WebKit, Blink, Edge */
    color:    #b6b6b6;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
    color:   #b6b6b6;
    opacity:  1;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
    color:    #b6b6b6;
    opacity:  1;
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color:    #b6b6b6;
}
::-ms-input-placeholder { /* Microsoft Edge */
    color:    #b6b6b6;
}
::placeholder { /* Most modern browsers support this now. */
    color: #b6b6b6;
}

#modal-experts {
    z-index: 501;
}

#modal-experts .modal-content {
    width: 90%;
}

#allExperts {
    position: relative;
    clear: both;
}
#allExperts .carusel__prev {
    position: absolute;
    top: calc(50% - 10px);
    left: 5px;
    z-index: 3;
}
#allExperts .carusel__next {
    position: absolute;
    top: calc(50% - 10px);
    right: 5px;
    z-index: 3;
}
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.card {
    margin: 0.8%; /* Отступы между карточками */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-content {
    display: flex;
    flex-flow: column-reverse;
}

.text-content {
    padding: 15px;
    flex: 1;
}

.text-content .expert-info {
    height: 180px;
    overflow-y: auto;
    padding: 5px;
}

.card-image {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 5px;
}
.card-image a {
    width: 120px;
    padding: 5px;
    text-decoration: none;
    text-align: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    margin: 0;
}

.card-image .expert-action {
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: column;
    padding: 5px;
}
.card-image .expert-action .btn-question {
    width: 108px;
    padding: 5px;
    text-align: center;
}

.card-title {
    font-size: 20px;
    margin: 0 0 10px;
}

.card-description {
    font-size: 16px;
    margin: 0 0 15px;
    text-align: justify;
}

.rating {
    font-size: 18px;
    margin: 10px 0;
    color: #999;
}
.rating .fa-star {
    color: gold;
}
.rating .fa-comment {
    margin: 0 3px 0 10px;
}

.btn-question, #modal-callme #myBtn1, .btn-showmore, .btn-call-experts {
    padding: 10px 15px;
    background-color: #3594bd;
    color: white !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-question:hover, #modal-callme #myBtn1:hover, .btn-showmore:hover, .btn-call-experts:hover {
    background-color: #0056b3;
    transition: ease-in-out 0.5s;
    cursor: pointer;
}

.popup-callme-block button:disabled {
    opacity: 0.5;
}

.btn-question-1 {
    margin: 0px 10px 0px 0px;
}

/* */
.expert_title {
    font-weight: bold;
    color: #3594bd;
    text-align: center;
    padding: 5px 0;
    border: 1px solid #3594bd;
    border-radius: 8px;
    width: 90%;
}
.expert_title_all {
    padding: 11px 0px;
    width: 90%;
}
.hidden-xs {
    display: none !important;
}

.hidden-sm {
    display: none !important;
}

/* Start modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    margin: 0;
    -webkit-overflow-scrolling: touch;
}
.modal-content {
    top: 50%;
    left: 50%;
    position: fixed;
    width: 100%;
    max-width: 265px;
    transform: translate(-50%, -50%);
    display: block;
    background-color: #fefefe;
    padding: 10px;
    border: 2px solid #1ea3d2;
    z-index: 1001;
    -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, .7);
    box-shadow: 0 3px 7px rgba(0, 0, 0, .7);
    -webkit-border-radius: 0 0 2px 2px;
    border-radius: 8px;
}
.modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.modal-content .modal-header h5 {
    font-size: 20px;
    margin: 0;
}
.modal-content .modal-header .close {
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
}
.modal-content .modal-header .close:hover {
    color: #555;
}
.modal-content .modal-header .close:hover {
    color: #555;
}
.modal-content .modal-body {
    margin: 20px 0 0 0;
}
.modal-content .modal-body .form-group {
    margin-bottom: 15px;
}
.modal-content .modal-body label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

#modal-expert-review .modal-content .modal-body .review {
    display: flex;
    align-items: center;
}
#modal-expert-review .modal-content .modal-body .review > div {
    display: flex; gap: 2px;
}
#modal-expert-review .modal-content .modal-body .review label {
    font-weight: unset;
    font-size: 18px;
    margin: 0 10px 0 0;
}
#modal-expert-review .modal-content .modal-body .review .star {
    transition: color 0.3s ease;
    color: #ffcc00;
    font-size: 30px;
    cursor: pointer;
}
#modal-expert-review .modal-content .modal-body textarea.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}
#modal-expert-review .modal-content .modal-body [type="submit"] {
    width: 100%;
    background-color: #13bfff;
    font-size: 18px;
}
/* End modal */

/* Start expert qa modal redesign */
#modal-qa-expert {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

#modal-qa-expert .modal-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: 90%;
    max-width: 520px;
    padding: 30px;
    border: none;
    border-radius: 20px;
    color: #00364a;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 54, 74, 0.22);
    box-sizing: border-box;
    max-height: 92vh;
    overflow-y: auto;
    transform: translate(-50%, -50%) !important;
}

#modal-qa-expert .expert-qa-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #00364a;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    background: #eef9ff;
    cursor: pointer;
    opacity: 1;
    transition: color .15s ease, background-color .15s ease, transform .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

#modal-qa-expert .expert-qa-close:hover,
#modal-qa-expert .expert-qa-close:focus {
    color: #fff;
    background: #2dc5ff;
    outline: none;
    transform: rotate(90deg);
}

#modal-qa-expert h2 {
    margin: 0 36px 22px 0;
    color: #00364a;
    font-family: Inter, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

#modal-qa-expert .qa-form-wrap {
    margin: 0;
    padding: 0;
}

#modal-qa-expert .expert-qa-field {
    margin: 0 0 14px;
}

#modal-qa-expert .form-label {
    display: block;
    margin: 0 0 8px;
    color: #00364a;
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

#modal-qa-expert .form-control {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: auto;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    color: #00364a;
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    border: 1px solid #d7e1e6;
    border-radius: 10px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

#modal-qa-expert .form-control:focus {
    outline: none;
    border-color: #2dc5ff;
    box-shadow: 0 0 0 3px rgba(45, 197, 255, 0.16);
}

#modal-qa-expert .has-error .form-control {
    border-color: #d93025;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12);
}

#modal-qa-expert .expert-qa-field-error,
#modal-qa-expert .expert-qa-form-error {
    display: none;
    margin-top: 6px;
    color: #d93025;
    font-family: Inter, Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

#modal-qa-expert .expert-qa-form-error {
    margin-top: 12px;
}

#modal-qa-expert textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

#modal-qa-expert .contact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin: 0 0 14px;
}

#modal-qa-expert .phone-block,
#modal-qa-expert .email-block {
    min-width: 0;
}

#modal-qa-expert .or-text {
    align-self: center;
    margin-top: 29px;
    color: #8a9aa3;
    font-size: 13px;
    line-height: 1.3;
}

#modal-qa-expert .callme-send-message label {
    margin: 0;
    color: #6f8088;
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

#modal-qa-expert .callme-send-message .form-select {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 32px;
    background-image: linear-gradient(45deg, transparent 50%, #6f8088 50%), linear-gradient(135deg, #6f8088 50%, transparent 50%);
    background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

#modal-qa-expert .expert-qa-telegram {
    margin: 0 0 14px;
    padding: 12px 14px;
    color: #00364a;
    font-size: 13px;
    line-height: 1.4;
    background: #eef9ff;
    border-radius: 10px;
}

#modal-qa-expert .telegramlink {
    width: 28px;
    height: 28px;
    margin-left: 8px;
    vertical-align: middle;
}

#modal-qa-expert .callme-policy {
    margin: 0 0 14px;
    color: #6f8088;
    font-size: 12px;
    line-height: 1.4;
}

#modal-qa-expert .callme-policy input {
    margin-right: 6px;
}

#modal-qa-expert .callme-policy-href {
    font-weight: 700;
}

#modal-qa-expert .expert-qa-actions {
    margin-top: 18px;
}

#modal-qa-expert .expert-qa-submit {
    display: block;
    width: 100%;
    padding: 13px 16px;
    color: #fff !important;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    background: #2dc5ff;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

#modal-qa-expert .expert-qa-submit:hover,
#modal-qa-expert .expert-qa-submit:focus {
    color: #fff !important;
    background: #1ea3d2;
    outline: none;
}

#modal-qa-expert .expert-qa-submit:disabled {
    opacity: .6;
    cursor: default;
}

#modal-qa-expert .notification {
    margin-top: 14px;
}

#modal-qa-expert .error {
    color: #d93025;
}

#modal-qa-expert .is-hidden {
    display: none !important;
}
/* End expert qa modal redesign */
.close {
    position: absolute;
    right: 7px;
    top: 0;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
/* отзывы на странице товара */
.seocmspro_author a {
    color: #000;
    font-weight: bold;
}
.RatingHistogram-Stars.Rating {
    margin-bottom: 5px;
    padding: 0;
    text-align: start;
    color: #fc0;

}
/* на странице товаров */
#modal-callme {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#modal-callme .btn-call-experts {
    max-width: 200px;
}
#modal-callme-form {
    width: 100%;
}

.nav-tabs {
    display: flex;
    flex-wrap: var(--nav-tabs-flex-wrap, nowrap);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    border-radius: 12px;
    background: #f2f2f2;
    white-space: nowrap;
}

.nav-tabs li {
    display: flex;
    align-items: center;
    height: 48px;
    margin: 0;
    padding: 0 15px;
}

.nav > li {
    display: block;
}

.nav-tabs li a.active,
.nav-tabs li a.active:focus,
.nav-tabs li a.active:hover {
    color: #3594bd;
}

.nav-tabs li a {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #3594bd;
    height: 100%;
    position: relative; /* Добавлено для правильного позиционирования псевдоэлемента */
    text-decoration: none; /* Отключение подчеркивания */
}

.nav-tabs li a:after {
    position: absolute;
    left: 0;
    width: 0;
    bottom: 10px;
    content: '';
    transition: all ease-in-out .15s;
    border-bottom: solid 2px transparent; /* Изменено на transparent по умолчанию */
}

.nav-tabs li a.active:after,
.nav-tabs li a:hover:after {
    width: 100%;
    border-bottom: solid 2px #3594bd; /* Установлено цвет нижней границы */
}

.nav-tabs li a.active:hover {
    color: #3594bd;
}


.tab-content {
    margin-top: 18px;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}

.reviews-list {
    margin-top: 20px;
}

.review-item {
    display: flex; /* Размещаем аватар и контент рядом */
    align-items: flex-start; /* Выравниваем по верхнему краю */
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.review-avatar-container {
    flex-shrink: 0; /* Запрещаем сжатие аватара */
    margin-right: 15px; /* Отступ между аватаром и контентом */
}

.review-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.review-content {
    flex-grow: 1; /* Контент занимает оставшееся пространство */
}
.review-content-qa {
    overflow: hidden;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.review-date {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
}

.review-date svg {
    margin-right: 5px;
    width: 14px;
    height: 14px;
    fill: #aaa;
}

.review-rating {
    font-size: 14px;
    color: #e74c3c;
    margin-bottom: 10px;
}

.review-comment {
    font-size: 18px; /* Увеличиваем размер шрифта для отзыва */
    line-height: 1.6;
    color: #555;
}
/* Общий контейнер для карточки товара */
.product-item {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
    text-align: center;
}

/* Эффект при наведении */
.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Изображение товара */
.product-item .image {
    position: relative;
    padding-top: 100%; /* Сохраняет пропорции 1:1 */
    overflow: hidden;
}

.product-item .image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.product-item:hover .image img {
    transform: translate(-50%, -50%) scale(1.1); /* Легкий эффект увеличения */
}

/* Название товара */
.product-item .name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin: 15px 10px 10px;
    height: 72px; /* Ограничиваем высоту для длинных названий */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-item .name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.product-item .name a:hover {
    color: #007bff; /* Цвет ссылки при наведении */
}

/* Общий контейнер для строк */
.additional-description .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px; /* Отрицательный отступ для компенсации padding */
    margin-right: -10px;
}

/* Базовый стиль для колонок */
.additional-description .col-md-3, .additional-description .col-xs-6 {
    box-sizing: border-box;
    padding-left: 10px; /* Отступы между колонками */
    padding-right: 10px;
    margin-bottom: 20px; /* Расстояние между рядами */
}

/* Адаптивность */

@media (max-width: 1297px) {
    .hidden-xs {
        display: block !important;
    }
}

@media (min-width: 1298px) {
    .hidden-sm {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .product-page-tabs {
        position: sticky;
        top: 0;
        z-index: 3;
    }
}

@media (max-width: 767px) {
    .nav-tabs {
        margin-left: -24px;
        margin-right: -24px;
        border-radius: 0;
    }
}

@media (min-width: 992px) {
    .nav-tabs {
        scrollbar-width: thin;
    }
}

@media (max-width: 767px) {
    .nav-tabs li {
        padding-right: 5px;
    }
}
@media (max-width: 767px) {
    .review-avatar-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .product-item {
        margin-bottom: 15px;
    }

    .product-item .name {
        font-size: 14px;
    }

    .product-item .price {
        font-size: 16px;
    }

    .product-item .cart-button button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (min-width: 425px) {
    .modal-content {
        max-width: 360px;
        padding: 20px 10px;
    }
}

@media (max-width: 424px) {
    .modal-content h2 {
        font-size: 16px;
    }
    .modal-content .contact-row {
        flex-flow: column;
    }
}

/* Средние экраны (≥768px) */
@media (min-width: 768px) {
    .additional-description .col-md-3 {
        width: 25%; /* 3 из 12 колонок (100% / 4 = 25%) */
    }
}

/* Маленькие экраны (<768px) */
.review-answer {
    font-size: 18px; /* Увеличиваем размер шрифта для отзыва */
    line-height: 1.6;
    color: #555;
    padding-left:20px;
    font-style: italic;
    background: #e8e8e8;
}

/* Специальные стили для мобильных устройств */
@media (max-width: 767px) {
    .additional-description .col-xs-6 {
        width: 50%; /* 6 из 12 колонок (100% / 2 = 50%) */
    }

    .modal {
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content {
        max-width: 95%;
        width: 100%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    #modal-qa-expert .modal-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px);
        margin: 12px auto;
        padding: 22px 16px 18px;
        border-radius: 16px;
        max-height: calc(100vh - 32px);
        transform: none !important;
        -webkit-overflow-scrolling: touch;
    }

    #modal-qa-expert .expert-qa-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 32px;
    }

    #modal-qa-expert h2 {
        margin-right: 40px;
        margin-bottom: 18px;
        font-size: 20px;
    }

    #modal-qa-expert .expert-qa-field {
        margin-bottom: 12px;
    }

    #modal-qa-expert .contact-row {
        display: block;
        margin-bottom: 12px;
    }

    #modal-qa-expert .or-text {
        display: flex;
        align-items: center;
        margin: 2px 0 14px;
    }

    #modal-qa-expert .or-text:before,
    #modal-qa-expert .or-text:after {
        content: "";
        flex: 1 1 auto;
        height: 1px;
        margin: 0 10px;
        background: #e3edf2;
    }

    #modal-qa-expert .callme-send-message label {
        display: block;
        margin-bottom: 8px;
        white-space: normal;
    }

    /* 16px — чтобы iOS не зумил страницу при фокусе на поле */
    #modal-qa-expert .form-control {
        font-size: 16px;
    }

    #modal-qa-expert textarea.form-control {
        min-height: 96px;
    }

    #modal-qa-expert .expert-qa-submit {
        min-height: 46px;
        font-size: 16px;
    }

    .btn-question {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .btn-question:active {
        background-color: #0056b3 !important;
    }
}
/* Попапы форм: «Написать вопрос» (#modal-qa, карточка товара), «Написать отзыв» (#modal-review,
   карточка товара), «Написать комментарий» (#modal-comment, рецепты). Оформление — как у попапа
   входа (#sign_box в header.tpl): Inter, скруглённые поля, кнопка отправки — общая .bt.bt-primary */
#modal-qa .modal-content,
#modal-review .modal-content,
#modal-comment .modal-content {
    width: 100%;
    max-width: 480px;
    padding: 22px 22px 24px;
    border: none;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    max-height: 92vh;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: left;
    font-family: 'Inter', Arial, sans-serif;
}
#modal-qa h2,
#modal-review h2,
#modal-comment h2 {
    margin: 0 0 16px;
    padding-right: 32px;
    font-family: 'Inter', Arial, sans-serif !important;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.25;
    color: #272727;
    text-transform: none !important;
}
#modal-qa .close,
#modal-review .close,
#modal-comment .close {
    top: 12px;
    right: 16px;
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    font-size: 26px;
    font-weight: normal;
    color: #9a9a9a;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color .15s, color .15s;
}
#modal-qa .close:hover,
#modal-review .close:hover,
#modal-comment .close:hover {
    background: #f0f0f0;
    color: #272727;
}
#modal-qa .qa-notice,
#modal-review .qa-notice,
#modal-comment .qa-notice {
    margin: 0 0 16px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #555;
    background: #f4f8fb;
    border-radius: 8px;
}
#modal-qa .qa-notice a,
#modal-review .qa-notice a,
#modal-comment .qa-notice a {
    font-size: inherit;
    font-weight: 600;
    color: #1ea3d2;
}
#modal-qa .qa-form-wrap,
#modal-review .qa-form-wrap,
#modal-comment .qa-form-wrap {
    position: relative;
    padding: 0;
}
#modal-qa label,
#modal-review label,
#modal-comment label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 500;
    color: #171716;
}
#modal-qa input[type="text"],
#modal-review input[type="text"],
#modal-comment input[type="text"],
#modal-qa textarea,
#modal-review textarea,
#modal-comment textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 14px;
    padding: 9px 14px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #171716;
    background: #fff;
    border: 1px solid #d0d1d0;
    border-radius: 8px;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
#modal-qa input[type="text"]:focus,
#modal-review input[type="text"]:focus,
#modal-comment input[type="text"]:focus,
#modal-qa textarea:focus,
#modal-review textarea:focus,
#modal-comment textarea:focus {
    outline: 0;
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
#modal-qa textarea,
#modal-review textarea,
#modal-comment textarea {
    min-height: 120px;
    resize: vertical;
}
#modal-qa .email-check-warning,
#modal-review .email-check-warning,
#modal-comment .email-check-warning {
    margin: -6px 0 12px;
    font-size: 13px;
    line-height: 1.4;
}
#modal-qa .qa-notify,
#modal-review .qa-notify,
#modal-comment .qa-notify {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: normal;
    color: #555;
    cursor: pointer;
}
#modal-qa .qa-notify input,
#modal-review .qa-notify input,
#modal-comment .qa-notify input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2dc5ff;
}
#modal-qa .qa-submit,
#modal-review .qa-submit,
#modal-comment .qa-submit {
    display: flex;
    width: 100%;
}
/* состояние отправки: форма размывается, поверх — «спасибо» */
#modal-qa .blur,
#modal-review .blur,
#modal-comment .blur {
    filter: blur(2px);
    pointer-events: none;
}
#modal-qa #loading-wrap,
#modal-review #loading-wrap,
#modal-comment #loading-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, .7);
}
#modal-qa #loading-wrap .text,
#modal-review #loading-wrap .text,
#modal-comment #loading-wrap .text {
    font-size: 15px;
    line-height: 1.4;
    color: #272727;
}

/* Попап отзыва: внутри — форма виджета отзывов (agoodonut, treecomments/rozetka.tpl),
   разметка модуля: <b><ins> вместо label, поля .form-control, звёзды jquery.rating */
/* кнопка «Оставить отзыв» под списком отзывов */
.container_reviews .review-form-open {
    margin: 16px 0 0;
}
#modal-review .modal-content {
    max-width: 520px;
}
#modal-review .margintop10 {
    margin-top: 0;
}
#modal-review .custom_form_avatar {
    display: none;
}
#modal-review form > br,
#modal-review .seocmspro_email > br,
#modal-review .seocmspro_customer_name > br {
    display: none;
}
/* «Войти или зарегистрироваться» над полями */
#modal-review form > ins {
    display: block;
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #555;
}
#modal-review form > ins a,
#modal-review form > ins .customer_enter {
    font-size: inherit;
    font-weight: 600;
    color: #1ea3d2;
}
#modal-review .color_entry_name {
    display: inline-block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 500;
    color: #171716;
}
#modal-review .seocmspro_author,
#modal-review .seocmspro_email {
    float: none;
    width: 100%;
}
#modal-review .form-control,
#modal-review input[type="text"].custom_input_entry,
#modal-review textarea.blog-record-textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0 0 14px;
    padding: 9px 14px !important;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #171716;
    background: #fff;
    border: 1px solid #d0d1d0;
    border-radius: 8px;
    box-shadow: none;
}
#modal-review .form-control:focus {
    outline: 0;
    border: 1px solid #86b7fe !important;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
#modal-review textarea.blog-record-textarea {
    min-height: 120px;
    resize: vertical;
}
#modal-review .email-check-warning {
    margin: -6px 0 12px;
    font-size: 13px;
    line-height: 1.4;
}
#modal-review .files-block {
    margin: 0 0 10px;
}
/* нативный input[type=file] шире узкого окна — давал горизонтальный скролл на телефоне */
#modal-review .files-block input[type="file"] {
    max-width: 100%;
    font-size: 14px;
}
#modal-review .text_note {
    display: block;
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.4;
    color: #777;
}
#modal-review .blog_require {
    color: #d9534f;
}
/* строка оценки: заголовок и звёзды в одну линию */
#modal-review .star-rating,
#modal-review .star-rating a {
    outline: none;
}
#modal-review .buttons-row {
    margin: 16px 0 0;
    padding: 0;
}
#modal-review .buttons-row .button-comment {
    display: flex;
    width: 100%;
    margin: 0;
}
/* встроенная форма входа виджета («Войти» → слайд с e-mail/паролем) */
#modal-review .form_customer_content {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f4f8fb;
    border-radius: 8px;
    font-size: 14px;
}
#modal-review .form_customer_content input[type="text"],
#modal-review .form_customer_content input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    margin: 4px 0 8px;
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #d0d1d0;
    border-radius: 8px;
}
/* сообщения об отправке (blog.comment.js вставляет .success/.warning/.attention после
   скрытого #comment-title — т.е. под заголовком окна). stylesheet.css делает
   .container_reviews .success/.warning фиксированным тостом по центру экрана — в окне
   показываем обычным блоком */
#modal-review .success,
#modal-review .warning,
#modal-review .attention {
    position: static;
    width: auto;
    margin: 0 0 14px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    transform: none;
    text-align: left;
    font-size: 14px;
    line-height: 1.45;
}
#modal-review .success {
    background: #e8f6ec !important;
    color: #1f6b34;
}
#modal-review .warning {
    background: #fdecea !important;
    color: #b0342b;
}
#modal-review .success .close,
#modal-review .warning .close {
    position: static;
    float: right;
    width: auto;
    height: auto;
    margin-left: 8px;
    cursor: pointer;
}

/* Попап комментария к рецепту (record/recipe.tpl): внутри — форма модуля
   (recipe_comment_form.tpl: h3, table.form, label > input.form-control, CKEditor, .police) */
#modal-comment .modal-content {
    max-width: 720px;
}
/* кнопка «Написать комментарий» под списком комментариев */
#comment_container .comment-form-open {
    margin: 16px 0 0;
}
#modal-comment #comment_form_container h3 {
    margin: 0 0 16px;
    padding: 0 32px 0 0;
    font-family: 'Inter', Arial, sans-serif !important;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.25;
    color: #272727;
    text-transform: none !important;
}
#modal-comment table.form,
#modal-comment table.form tbody,
#modal-comment table.form tr,
#modal-comment table.form td {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
}
/* e-mail и имя (.comment-field, каждый со своей ошибкой) — в одну строку,
   остальное на всю ширину: окно пошире, но пониже */
#modal-comment table.form td {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}
#modal-comment table.form td > :not(.comment-field) {
    grid-column: 1 / -1;
}
@media (max-width: 600px) {
    #modal-comment table.form td {
        grid-template-columns: 1fr;
    }
}
#modal-comment table.form td > br,
#modal-comment table.form label br,
#modal-comment .police br {
    display: none;
}
#modal-comment table.form label {
    display: block;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #171716;
}
#modal-comment .required {
    color: #d9534f;
}
/* input.form-control — чтобы перебить общее #modal-comment input[type="text"] выше */
#modal-comment input.form-control,
#modal-comment textarea.form-control {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: auto;
    margin: 6px 0 0;
    padding: 9px 14px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #171716;
    background: #fff;
    border: 1px solid #d0d1d0;
    border-radius: 8px;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
#modal-comment input.form-control:focus,
#modal-comment textarea.form-control:focus {
    outline: 0;
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
#modal-comment .cke_chrome {
    margin-top: 6px;
    border-color: #d0d1d0;
    border-radius: 8px;
    overflow: hidden;
}
#modal-comment .error {
    margin: -8px 0 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #d9534f;
}
/* ошибка текста лежит внутри label, под CKEditor */
#modal-comment label .error {
    margin: 6px 0 0;
}
#modal-comment .email-check-warning {
    margin: -8px 0 14px;
    font-size: 13px;
    line-height: 1.4;
}
#modal-comment .police {
    margin: 0 0 18px;
}
#modal-comment .police label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: normal;
    color: #555;
    cursor: pointer;
}
#modal-comment .police label input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: none;
    accent-color: #2dc5ff;
}
#modal-comment .police label a {
    font-size: inherit;
    color: #1ea3d2;
}
#modal-comment .buttons-row {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
}
#modal-comment .buttons-row .bt {
    flex: 1;
    display: flex;
}
#modal-comment .notification {
    margin: 0 0 14px;
}

/* Задача CRM #358357, п. «Наши эксперты: слева пустота, окно не по центру».
   bootstrap.min.css подключается после этого файла и перебивает .modal-content
   {position:fixed} своим position:relative — left:50% + translate(-50%) при
   relative-позиционировании даёт сдвиг вправо на 5% ширины (ещё 5% добавляет
   margin: auto при width:90%). На телефоне окно центрируем обычным потоком. */
@media (max-width: 767px) {
    #modal-experts .modal-content,
    #modal-qa .modal-content,
    #modal-review .modal-content,
    #modal-comment .modal-content,
    #modal-expert-review .modal-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: auto;
        max-width: none;
        margin: 16px;
        border-radius: 16px;
    }
    #modal-experts #allExperts,
    #modal-experts .expert_title_all {
        width: 100%;
    }
    /* z-index 501 был ниже переключателя языка/валюты в шапке (#glanguage, 999) — тот
       просвечивал сквозь заголовок окна */
    #modal-experts {
        z-index: 1003;
    }
    #modal-experts .modal-content p,
    #modal-experts .modal-content .expert-description {
        text-align: left;
    }
}
