/* ============================================
   MESSENGER POPUP — «Подключите мессенджер»
   Глобальный попап. Изолированные стили.
   ============================================ */

/* ===== ОБЩИЕ ===== */
.messenger-popup .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.messenger-popup .modal-dialog {
    max-width: 440px;
    margin: 1.75rem auto;
}

/* ===== HEADER ===== */
.messenger-popup__header {
    background: #22a7f0;
    color: #fff;
    border-bottom: none;
    padding: 16px 56px 16px 20px;
    /* правый отступ под крестик */
    position: relative;
    min-height: 56px;
    display: flex;
    align-items: center;
}

.messenger-popup__title {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
}

.messenger-popup__close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    opacity: 0.9;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
    margin: 0;
}

.messenger-popup__close:hover,
.messenger-popup__close:focus {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

/* ===== BODY ===== */
.messenger-popup__body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background: #fff;
}

.messenger-popup__text {
    margin: 0;
    white-space: pre-line;
    /* сохраняем переносы строк из \n */
}

/* ===== FOOTER ===== */
.messenger-popup__footer {
    padding: 0 20px 20px 20px;
    background: #fff;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

/* ===== КНОПКИ ===== */
.messenger-popup__btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-align: center;
    min-height: 48px;
}

.messenger-popup__btn:active {
    transform: scale(0.98);
}

/* Мессенджер-кнопки — синие */
.messenger-popup__btn--messenger {
    background: #22a7f0;
    color: #fff;
}

.messenger-popup__btn--messenger:hover {
    background: #1e96d9;
}

/* Отмена — серая */
.messenger-popup__btn--cancel {
    background: #f0f0f0;
    color: #555;
}

.messenger-popup__btn--cancel:hover {
    background: #e5e5e5;
}

/* ===== МОБИЛЬНЫЙ ===== */
@media (max-width: 576px) {
    .messenger-popup .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
        display: flex;
        align-items: flex-end;
        /* прижимаем к низу */
    }

    .messenger-popup .modal-content {
        border-radius: 16px 16px 0 0;
        /* скругление сверху */
        width: 100%;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .messenger-popup__body {
        padding: 20px 20px 16px;
        flex: 1;
        overflow-y: auto;
    }

    .messenger-popup__footer {
        padding: 0 20px 24px;
        /* больше снизу — под палец */
    }

    .messenger-popup__btn {
        padding: 16px;
        font-size: 16px;
        min-height: 52px;
    }
}