/* PWA Bottom Navigation Styles */
/* Показывается ТОЛЬКО в режиме standalone (PWA) */

/* По умолчанию скрыто */
.pwa-bottom-nav {
    display: none;
}

/* Показываем только в PWA режиме */
@media (display-mode: standalone) {
    .pwa-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #222429;
        z-index: 9998;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Добавляем отступ внизу body для PWA меню */
    body {
        padding-bottom: 80px !important;
    }
    
    /* Скрываем гамбургер меню в PWA */
    .mobile_header_icon .menu.mobile {
        display: none !important;
    }
    
    /* Скрываем стандартные баннеры установки в PWA */
    .install-app-cto-panel,
    #pwa-install-banner,
    #ios-install-panel {
        display: none !important;
    }
}

/* iOS PWA поддержка через navigator.standalone */
body.is-pwa-standalone .pwa-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #222429;
    z-index: 9998;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.is-pwa-standalone {
    padding-bottom: 80px !important;
}

body.is-pwa-standalone .mobile_header_icon .menu.mobile {
    display: none !important;
}

body.is-pwa-standalone .install-app-cto-panel,
body.is-pwa-standalone #pwa-install-banner,
body.is-pwa-standalone #ios-install-panel {
    display: none !important;
}

/* Navigation Items */
.pwa-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    min-width: 60px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.pwa-nav-item:hover,
.pwa-nav-item:focus {
    color: #fff;
    text-decoration: none;
}

.pwa-nav-item:active {
    transform: scale(0.95);
}

.pwa-nav-item.active {
    color: #4da6ff;
}

.pwa-nav-item.active .pwa-nav-icon {
    stroke: #4da6ff;
}

/* Navigation Icons */
.pwa-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Navigation Labels */
.pwa-nav-label {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    white-space: nowrap;
}

/* PWA Modal Styles */
.pwa-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwa-modal.active {
    display: flex;
}

.pwa-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.pwa-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    z-index: 1;
}

.pwa-modal-close:hover {
    color: #333;
}

.pwa-modal-body {
    padding: 30px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    text-align: center;
}

/* Landscape orientation adjustments */
@media (display-mode: standalone) and (orientation: landscape) {
    .pwa-bottom-nav {
        padding: 6px 0;
    }
    
    .pwa-nav-icon {
        width: 20px;
        height: 20px;
    }
    
    .pwa-nav-label {
        font-size: 9px;
    }
    
    body {
        padding-bottom: 60px !important;
    }
}

/* Small screens */
@media (display-mode: standalone) and (max-width: 360px) {
    .pwa-nav-label {
        font-size: 9px;
    }
    
    .pwa-nav-item {
        min-width: 50px;
        padding: 4px 4px;
    }
}

