/**
 * Floating Navigation Panel Styles
 * Compact, user-friendly navigation
 */

/* ========================================
   Floating Trigger Button
   ======================================== */

#floating-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fnav-trigger {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.fnav-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #334155, #475569);
}

.fnav-trigger i {
    font-size: 1.4rem;
}

.fnav-trigger-badge {
    font-size: 0.6rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 5px;
    border-radius: 8px;
}

/* ========================================
   Panel Container
   ======================================== */

.fnav-panel {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 280px;
    max-height: 70vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(10px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#floating-nav.open .fnav-panel {
    display: flex;
    transform: translateY(0) scale(1);
    opacity: 1;
}

#floating-nav.open .fnav-trigger {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* ========================================
   Panel Header
   ======================================== */

.fnav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.fnav-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.fnav-title i {
    color: #3b82f6;
}

.fnav-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fnav-progress {
    font-size: 0.75rem;
    color: #6b7280;
    background: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.fnav-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.fnav-close:hover {
    color: #4b5563;
}

/* ========================================
   Panel Content
   ======================================== */

.fnav-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Custom scrollbar */
.fnav-content::-webkit-scrollbar {
    width: 4px;
}

.fnav-content::-webkit-scrollbar-track {
    background: transparent;
}

.fnav-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

/* ========================================
   Zones
   ======================================== */

.fnav-zone {
    margin-bottom: 0.25rem;
}

.fnav-zone-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--zone-color, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fnav-zone-header i {
    font-size: 0.85rem;
}

.fnav-zone-count {
    margin-left: auto;
    font-size: 0.65rem;
    background: #f3f4f6;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    color: #6b7280;
    font-weight: 500;
}

.fnav-zone.complete .fnav-zone-count {
    background: #d1fae5;
    color: #059669;
}

/* ========================================
   Navigation Items
   ======================================== */

.fnav-zone-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fnav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem 0.6rem 1.75rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.15s ease;
    position: relative;
}

.fnav-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.fnav-item-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.fnav-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Visited state */
.fnav-item.visited .fnav-item-dot {
    background: #10b981;
}

.fnav-item.visited {
    color: #374151;
}

/* Active/Current state */
.fnav-item.active {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    color: #1e40af;
    font-weight: 500;
}

.fnav-item.active .fnav-item-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.fnav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #3b82f6;
    border-radius: 0 2px 2px 0;
}

/* ========================================
   Panel Footer
   ======================================== */

.fnav-footer {
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.fnav-reset {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fnav-reset:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 480px) {
    #floating-nav {
        bottom: 15px;
        left: 15px;
    }

    .fnav-trigger {
        width: 50px;
        height: 50px;
    }

    .fnav-panel {
        width: calc(100vw - 30px);
        max-height: 60vh;
        left: 0;
        bottom: 65px;
    }
}

/* ========================================
   Dark Mode Support
   ======================================== */

@media (prefers-color-scheme: dark) {
    .fnav-panel {
        background: rgba(30, 41, 59, 0.98);
    }

    .fnav-header {
        background: #1e293b;
        border-color: #334155;
    }

    .fnav-title {
        color: #f1f5f9;
    }

    .fnav-close {
        color: #64748b;
    }

    .fnav-close:hover {
        color: #94a3b8;
    }

    .fnav-progress {
        background: #334155;
        color: #94a3b8;
    }

    .fnav-zone-count {
        background: #334155;
        color: #94a3b8;
    }

    .fnav-zone.complete .fnav-zone-count {
        background: #064e3b;
        color: #34d399;
    }

    .fnav-item {
        color: #94a3b8;
    }

    .fnav-item:hover {
        background: #334155;
        color: #e2e8f0;
    }

    .fnav-item.visited {
        color: #cbd5e1;
    }

    .fnav-item.active {
        background: linear-gradient(135deg, #1e3a5f, #1e3a8a);
        color: #93c5fd;
    }

    .fnav-item-dot {
        background: #475569;
    }

    .fnav-footer {
        background: #1e293b;
        border-color: #334155;
    }

    .fnav-reset {
        background: #334155;
        color: #94a3b8;
    }

    .fnav-reset:hover {
        background: #475569;
        color: #e2e8f0;
    }
}

/* ========================================
   Print - Hide
   ======================================== */

@media print {
    #floating-nav {
        display: none;
    }
}
