/* 
 * Copyright (c) ITech4net SAS. All rights reserved.
 * Created: 2026-02-16
 * Modified: 2026-02-16
 * 
 * Navigation Dock - Unified FAB Menu (Desktop & Mobile)
 */

/* ========================================
   Navigation Dock (Unified FAB - Desktop & Mobile)
   ======================================== */
.nav-dock {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0;
}

/* Toggle Button (Always Visible) */
.nav-toggle {
    display: flex;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2A2A35, #1A1A20);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1002;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-toggle:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-toggle.active {
    transform: rotate(90deg);
    background: #ff0055;
    border-color: #ff0055;
}

.nav-items {
    position: absolute;
    bottom: 70px;
    right: 4px;
    display: flex;
    flex-direction: column-reverse;
    gap: 16px;
    pointer-events: none;
}

.nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(30, 30, 35, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.nav-btn:not(#add-brand-btn) {
    transition: background 0.25s ease-out, color 0.25s ease-out,
                transform 0.25s ease-out,
                box-shadow 0.25s ease-out, border-color 0.25s ease-out,
                filter 0.25s ease-out, opacity 0.25s ease-out;
}

/* Labels */
.nav-label {
    position: absolute;
    right: 60px;
    padding: 0;
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.nav-label-title {
    font-weight: 700;
    color: white;
    font-size: 15px;
    margin-bottom: 0;
    line-height: 1.2;
}

.nav-label-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Show Description on Hover */
.nav-dock .nav-btn:hover .nav-label-desc {
    max-height: 20px;
    opacity: 1;
    margin-top: 4px;
}

/* Add Brand - Primary Action with permanent gradient */
.nav-dock #add-brand-btn {
    background: linear-gradient(135deg, #00d4ff, #8800ff);
    border: none;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.nav-dock #add-brand-btn:hover,
.nav-dock #add-brand-btn:active {
    background: linear-gradient(135deg, #33dcff, #a541ff);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.5);
}

/* Premium Hover Effect (Global) - Hovered item grows more */
.nav-dock .nav-btn:not(#add-brand-btn):hover,
.nav-dock .nav-btn:not(#add-brand-btn):active {
    background: linear-gradient(135deg, #8E2DE2, #4A00E0);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 16px 40px rgba(142, 45, 226, 0.5);
    transform: scale(1.28) translateX(-5px) !important;
    z-index: 10;
    filter: blur(0) !important;
    opacity: 1 !important;
}

/* Wave effect — applied via JS by adding data-wave on .nav-items */
/* Direct neighbors (distance 1): subtle shrink + fade */
.nav-items[data-wave] .nav-btn.wave-near {
    transform: scale(0.92) !important;
    opacity: 0.6 !important;
    filter: none !important;
    transition: transform 0.22s ease-out,
                opacity 0.22s ease-out !important;
}

.nav-items[data-wave] .nav-btn.wave-near .nav-label {
    opacity: 0.4 !important;
    transition: opacity 0.22s ease-out !important;
}

/* Far neighbors (distance 2+): opacity fade only, NO scale (avoids pulse) */
.nav-items[data-wave] .nav-btn.wave-far {
    transform: scale(1) !important;
    opacity: 0.28 !important;
    filter: none !important;
    transition: opacity 0.22s ease-out,
                transform 0.22s ease-out !important;
}

.nav-items[data-wave] .nav-btn.wave-far .nav-label {
    opacity: 0.15 !important;
    transition: opacity 0.22s ease-out !important;
}

/* Hovered item label: fully visible and crisp */
.nav-items[data-wave] .nav-btn:hover .nav-label,
.nav-items[data-wave] .nav-btn:not(.wave-near):not(.wave-far) .nav-label {
    opacity: 1 !important;
    transition: opacity 0.22s ease-out !important;
}

/* Cleanup when wave ends */
.nav-dock:has(.nav-btn:hover) .nav-btn:not(:hover):not(.wave-near):not(.wave-far) {
    filter: none;
    opacity: 1;
}

/* Active/Focus State for Mobile Touch */
.nav-dock .nav-btn:active .nav-label-desc {
    max-height: 20px;
    opacity: 1;
    margin-top: 4px;
    transition-delay: 2s;
}

/* Active State (Menu Open) */
.nav-dock.active .nav-items {
    pointer-events: auto;
}

.nav-dock.active .nav-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.nav-dock.active .nav-label {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Delay */
.nav-dock.active .nav-btn:nth-child(1) {
    transition-delay: 0.05s;
}

.nav-dock.active .nav-btn:nth-child(2) {
    transition-delay: 0.1s;
}

.nav-dock.active .nav-btn:nth-child(3) {
    transition-delay: 0.15s;
}

.nav-dock.active .nav-btn:nth-child(4) {
    transition-delay: 0.2s;
}

.nav-dock.active .nav-btn:nth-child(5) {
    transition-delay: 0.25s;
}

.nav-dock.active .nav-btn:nth-child(6) {
    transition-delay: 0.3s;
}

/* Mobile Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.0);
    backdrop-filter: blur(0px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.nav-overlay.active {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-dock {
        bottom: 24px;
        right: 24px;
    }
}
