/* =========================================
   POPUP MAKER - CLEAN STYLES FOR AVPLASTICA
   Refactored Version
   ========================================= */

/* --- 1. OVERLAY & CONTAINER --- */

/* Затемнение фона (overlay) */
.pum-overlay.pum-theme-1,
.pum-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(2px);
}

/* Основной контейнер */
.pum-container.popup-avplastica {
    max-width: 750px !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Сброс внутренних отступов Popup Maker */
.pum-container.popup-avplastica .pum-content {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Наш контентный блок */
.popup-avplastica-content {
    display: flex;
    align-items: stretch;
    background: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    /* Для позиционирования элементов внутри */
}

/* --- 2. LAYOUT (IMAGE & TEXT) --- */

/* Изображение */
.popup-avplastica-image {
    width: 35%;
    /* Фиксированная пропорция */
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-avplastica-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Текст и форма */
.popup-avplastica-text {
    width: 65%;
    /* Остальная часть */
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Типографика */
.popup-avplastica-title {
    font-size: 22px;
    font-weight: 600;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.2;
}

.popup-avplastica-subtitle {
    font-size: 18px;
    color: #4586bf;
    font-weight: 700;
    margin-bottom: 15px;
}

.popup-avplastica-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* --- 3. FORM STYLES (Contact Form 7) --- */

/* Сброс стилей контейнеров CF7 */
.popup-avplastica .wpcf7,
.popup-avplastica .wpcf7 form,
.popup-avplastica .wpcf7-form-control-wrap {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Поле ввода */
.popup-avplastica .wpcf7-tel {
    width: 100% !important;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

/* Кнопка отправки (SUBMIT) */
.popup-avplastica input[type="submit"],
.popup-avplastica button[type="submit"],
.popup-avplastica .wpcf7-submit {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 15px 0 !important;
    background: #4586bf !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s;
    float: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.popup-avplastica input[type="submit"]:hover,
.popup-avplastica button[type="submit"]:hover,
.popup-avplastica .wpcf7-submit:hover {
    background: #3879b2 !important;
}

/* --- 4. CLOSE BUTTON (Standard Popup Maker) --- */

/* Стилизация штатного крестика */
.pum-container.popup-avplastica .pum-close {
    position: absolute !important;
    top: -15px !important;
    right: -15px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
    opacity: 1 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    text-indent: 0 !important;
}

/* Убеждаемся, что крестик виден */
.pum-container.popup-avplastica .pum-close:after {
    content: "×";
    font-weight: bold;
}

/* --- 5. FOOTER & EXTRAS --- */

.popup-avplastica-privacy {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 10px;
}

.popup-avplastica-privacy a {
    color: #4586bf;
    text-decoration: underline;
}

.popup-avplastica .wpcf7-response-output {
    margin: 10px 0 0 0 !important;
    padding: 10px !important;
    border-radius: 3px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    font-size: 13px;
    text-align: center;
}

/* --- 6. RESPONSIVE --- */

@media (max-width: 768px) {
    .pum-container.popup-avplastica {
        width: 90% !important;
        max-width: 400px !important;
    }

    .popup-avplastica-content {
        flex-direction: column;
    }

    .popup-avplastica-image {
        display: none;
        /* Скрываем картинку на мобильных для экономии места */
    }

    .popup-avplastica-text {
        width: 100%;
        padding: 20px;
    }

    .popup-avplastica-title {
        font-size: 18px;
        text-align: center;
    }

    .popup-avplastica-subtitle {
        font-size: 16px;
        text-align: center;
    }
}