﻿/* =================================================================
   ОРИГИНАЛЬНАЯ ВЫДВИЖНАЯ МОДАЛЬНАЯ СИСТЕМА (Правый слайдер)
   ================================================================= */
.owerlay {
    position: fixed;
    top: 0;
    right: -100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    width: 100%;
    height: 100%;
    transition: background-color 0.3s ease;
}

.owerlay.active {
    display: block !important;
    left: 0;
    right: 0;
}

/* Белая выдвигающаяся подложка */
.block-webform {
    position: fixed;
    top: 0;
    height: 100%;
    width: 100%;
    background: #ffffff;
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    right: -100%;
}

.owerlay.active .block-webform {
    right: 0;
}

/* Ограничиваем ширину выдвижного окна на больших мониторах */
@media (min-width: 840px) {
    .block-webform {
        max-width: 800px;
    }
}
@media (min-width: 1334px) {
    .block-webform {
        max-width: 950px;
    }
}

/* Статичное отображение, если всплывание param13 отключено */
.mscallback .static-layout {
    position: relative;
    background: none;
    z-index: 1;
}

.mscallback .static-layout .block-webform {
    position: relative;
    right: 0;
    background: none;
    max-width: 100%;
}

/* Позиционирование содержимого выдвижного окна */
.panel_inner {
    padding: 35px 65px 35px 110px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);  
    width: 100%;
    max-width: 550px;
    box-sizing: border-box;
}

/* Заголовки */
.zvonoktitle {
    font-size: 22px;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 8px;
    color: #222222;
}

.mstext {
    font-size: 14px;
    color: #666666;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Кнопка закрытия (крестик) */
img.close-panel {
    position: absolute;
    right: 35px;
    top: 35px;
    cursor: pointer;
    transition: transform 0.4s ease;
    z-index: 10200;
    max-width: 31px;
}

img.close-panel:hover {
    transform: rotate(180deg);
}

/* =================================================================
   МАГИЯ CSS GRID ДЛЯ ПОЛЕЙ ФОРМЫ
   ================================================================= */
.form-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Включение горизонтальной раскладки по параметру param34 */
@media (min-width: 768px) {
    .form-fields-grid.horizontal {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .form-fields-grid.horizontal .input-group.full-width {
        grid-column: 1 / -1;
    }
}

/* Стилизация полей */
.form-input,
.form-textarea {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #dcdcdc;
    background-color: #ffffff;
    border-radius: 4px;
    font-size: 15px;
    color: #333333;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea {
    height: 100px;
    padding: 12px 15px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #33a0ff;
    box-shadow: 0 0 8px rgba(51, 160, 255, 0.2);
}

/* Согласие с политикой конфиденциальности */
.agreement-privacy-block {
    margin-top: 15px;
}

.agreement-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.agreement-checkbox {
    margin-top: 3px;
}

.agreement-text {
    font-size: 12px;
    color: #666666;
    line-height: 1.4;
}

.agreement-text a {
    color: #33a0ff;
    text-decoration: underline;
}

/* Статусные сообщения */
.status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.status.success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.status.error {
    background-color: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}

/* Кнопки вызова */
.buttonSend.callbackButton {
    transition: background-color 0.2s;
}

.buttonSend.callbackButton:hover {
    background-color: #1e87e5;
}

.buttonSubmit {
    background-color: #33a0ff;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.buttonSubmit:hover {
    background-color: #1e87e5;
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    .panel_inner {
        padding: 30px;
        margin: 0 auto;
        left: 0;
        right: 0;
        max-width: 440px;
    }
}
