/* assets/mobile.css */

/* Скрываем крестик на ПК, чтобы он не вылезал в футере */
@media (min-width: 1025px) {
    .wff-mobile-close { 
        display: none !important; 
    }
}

.wff-mobile-open { display: none; }

@media (max-width: 1024px) {
    .wff-mobile-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        
        /* Вместо fixed теперь используется sticky или inline-block */
        position: relative; 
        left: auto;
        z-index: 99999;
        
        padding: 8px 14px;
        background: #405A70;
        color: #fff;
        border: none;
        border-radius: 25px;
        font-size: 15px;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        margin: 0px;
    }
    
    .wff-mobile-open:hover, .wff-mobile-open:focus, .wff-mobile-open:active {
        background: #2B3548; color: #fff; outline: none; box-shadow: none;
    }

    /* Иконка внутри кнопки */
    .wff-mobile-open-icon {
        flex-shrink: 0;
        display: block;
        width: 16px;
        height: 16px;
        color: currentColor;
        margin-top: -1px;
    }

    .wff-mobile-open-text {
        line-height: 1;
    }

    .wff-mobile-hidden { display: none !important; }

    .wff-mobile-popup {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh; height: 100dvh;
        z-index: 10000000;
        pointer-events: none;
        visibility: hidden;
        overflow: hidden;
    }
    .wff-mobile-popup-inner {
        position: absolute;
        top: 0; left: 0;
        width: 90%; max-width: 90%; height: 100%;
        background: #fff;
        box-shadow: 2px 0 12px rgba(0,0,0,0.15);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 20px 15px;
        box-sizing: border-box;
    }
    .wff-mobile-popup.wff-mobile-popup-open { visibility: visible; pointer-events: auto; }
    .wff-mobile-popup.wff-mobile-popup-open .wff-mobile-popup-inner { transform: translateX(0); }

    .wff-mobile-close {
        position: absolute;
        top: 10px; right: 12px;
        width: 60px; height: 60px;
        border: none; background: transparent;
        font-size: 50px; line-height: 1;
        color: #2B3548; cursor: pointer; z-index: 1; padding: 0;
    }
    .wff-mobile-close:hover, .wff-mobile-close:focus { color: #FF6600; outline: none; }

    .wff-mobile-popup-content .wff-container {
        max-width: 100%; margin: 0; margin-top: 30px;
    }

    body.wff-mobile-popup-active { overflow: hidden; }
}

/* На очень узких экранах можно оставить только иконку */
@media (max-width: 360px) {
    .wff-mobile-open-text { display: none; }
    .wff-mobile-open { padding: 8px 10px; }
}