/* Bottom Bar Moderno Global */
:root {
    --app-bottom-bar-height: calc(84px + env(safe-area-inset-bottom, 16px));
    --floating-action-platform-lift: 0px;
}

body.platform-ios {
    --floating-action-platform-lift: calc(var(--app-bottom-bar-height, 84px) / 2);
}

body.platform-android {
    --floating-action-platform-lift: calc((var(--app-bottom-bar-height, 84px) / 2) + 5px);
}

.modern-bottom-bar-spacer {
    width: 100%;
    height: var(--app-bottom-bar-height);
    flex-shrink: 0;
    pointer-events: none;
}

.modern-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.9) 50%,
        rgba(241, 245, 249, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(200%) brightness(120%);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(120%);
    border: none;
    border-radius: 0;
    padding: 12px 24px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 16px));
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: none;
    z-index: 1000;
    margin-bottom: -1px;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.keyboard-open {
    --app-bottom-bar-height: 0px;
    --floating-action-platform-lift: 0px;
}

body.keyboard-open .modern-bottom-bar-spacer {
    height: 0 !important;
}

body.keyboard-open .modern-bottom-bar {
    opacity: 0;
    transform: translateY(110%);
    pointer-events: none;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bottom-bar-btn {
    background: transparent;
    border: none;
    padding: 12px;
    cursor: pointer;
    color: #6B7280;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    position: relative;
    text-decoration: none;
}

.bottom-bar-btn:hover {
    color: #4a9d8e;
    background: rgba(74, 157, 142, 0.08);
}

.bottom-bar-btn:active {
    background: rgba(74, 157, 142, 0.12);
    transition: all 0.1s ease;
}

.bottom-bar-btn svg,
.bottom-bar-btn i {
    width: 24px;
    height: 24px;
    transition: color 0.2s ease;
}

.bottom-bar-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estado ativo para todos os botões */
.bottom-bar-btn.active {
    background: linear-gradient(135deg, #4a9d8e 0%, #3e8b7a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 157, 142, 0.2);
}

.bottom-bar-btn.active:hover {
    background: linear-gradient(135deg, #52a396 0%, #469082 100%);
    box-shadow: 0 4px 12px rgba(74, 157, 142, 0.3);
}

/* Responsividade avançada */
@media (max-width: 380px) {
    .modern-bottom-bar {
        left: 0;
        right: 0;
        padding: 10px 16px;
    }
    
    .bottom-bar-btn {
        width: 48px;
        height: 48px;
        padding: 10px;
    }
    
    .bottom-bar-btn svg,
    .bottom-bar-btn i {
        width: 20px;
        height: 20px;
    }
}

/* Ocultar bottom bar em desktop */
@media (min-width: 1025px) {
    :root,
    body.platform-ios,
    body.platform-android {
        --floating-action-platform-lift: 0px;
    }

    .modern-bottom-bar-spacer {
        display: none !important;
    }

    .modern-bottom-bar {
        display: none !important;
    }
}
