/* Floating Bottom Menu Styles */

.fbm-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.fbm-container.fbm-minimized {
    transform: translateX(-50%) translateY(calc(var(--fbm-menu-height) + 10px));
}

.fbm-toggle {
    background: var(--fbm-bg-color);
    color: var(--fbm-text-color);
    width: 50px;
    height: 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.fbm-toggle:hover {
    background: color-mix(in srgb, var(--fbm-bg-color) 85%, black);
}

.fbm-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.fbm-container.fbm-minimized .fbm-toggle-icon {
    transform: rotate(180deg);
}

.fbm-menu {
    background: var(--fbm-bg-color);
    border-radius: var(--fbm-border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.fbm-container.fbm-minimized .fbm-menu {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.fbm-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--fbm-menu-height);
}

.fbm-menu-item {
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 60px;
}

.fbm-menu-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    text-decoration: none;
    color: var(--fbm-text-color);
    transition: all 0.3s ease;
    position: relative;
    min-height: calc(var(--fbm-menu-height) - 20px);
    border-radius: 12px;
    margin: 0 2px;
}

.fbm-menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: var(--fbm-text-color);
    text-decoration: none;
}

.fbm-menu-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.fbm-icon {
    font-size: var(--fbm-icon-size);
    line-height: 1;
    display: block;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.fbm-menu-link:hover .fbm-icon {
    transform: scale(1.1);
}

.fbm-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

.fbm-menu-link:hover .fbm-label {
    opacity: 1;
}

/* Hide labels when not enabled */
.fbm-container:not(.fbm-show-labels) .fbm-label {
    display: none;
}

.fbm-container:not(.fbm-show-labels) .fbm-icon {
    margin-bottom: 0;
}

.fbm-container:not(.fbm-show-labels) .fbm-menu-link {
    padding: 15px 8px;
}

/* Active/Current Menu Item */
.fbm-menu-item.current-menu-item .fbm-menu-link,
.fbm-menu-item.current_page_item .fbm-menu-link {
    background: rgba(255, 255, 255, 0.15);
}

.fbm-menu-item.current-menu-item .fbm-icon,
.fbm-menu-item.current_page_item .fbm-icon {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .fbm-container {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: calc(100vw - 20px);
    }
    
    .fbm-container.fbm-minimized {
        transform: translateY(calc(var(--fbm-menu-height) + 10px));
    }
    
    .fbm-menu {
        border-radius: calc(var(--fbm-border-radius) * 0.7);
    }
    
    .fbm-menu-item {
        min-width: 50px;
    }
    
    .fbm-label {
        font-size: 10px;
        max-width: 50px;
    }
}

@media (max-width: 480px) {
    .fbm-icon {
        font-size: calc(var(--fbm-icon-size) * 0.9);
    }
    
    .fbm-label {
        font-size: 9px;
    }
    
    .fbm-menu-link {
        padding: 8px 4px;
    }
    
    .fbm-container:not(.fbm-show-labels) .fbm-menu-link {
        padding: 12px 4px;
    }
}

/* Animation for initial load */
@keyframes fbm-slide-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.fbm-container {
    animation: fbm-slide-up 0.5s ease-out;
}

@media (max-width: 768px) {
    @keyframes fbm-slide-up-mobile {
        from {
            opacity: 0;
            transform: translateY(100px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .fbm-container {
        animation: fbm-slide-up-mobile 0.5s ease-out;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .fbm-menu {
        border: 2px solid var(--fbm-text-color);
    }
    
    .fbm-menu-link:hover {
        background: var(--fbm-text-color);
        color: var(--fbm-bg-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fbm-container,
    .fbm-menu,
    .fbm-menu-link,
    .fbm-icon,
    .fbm-label,
    .fbm-toggle,
    .fbm-toggle-icon {
        transition: none;
        animation: none;
    }
}

/* Print styles */
@media print {
    .fbm-container {
        display: none;
    }
}