/*
 * FILE: navigation.css
 * PURPOSE: Mega menu and mobile footer navigation styles
 * SPEC PROJECT: SP-SRUserFlow
 *
 * KEY RESPONSIBILITIES:
 *  - Mega menu dropdown styling
 *  - Mobile footer navigation
 *  - Bottom sheet menu for mobile
 *  - Smooth animations and transitions
 *
 * DEPENDENCIES:
 *  - sparkus-2026.css (CSS variables)
 *
 * LAST UPDATED: December 9, 2025 by /go agent
 * CHANGE SUMMARY: Initial creation for E1-Navigation-Restructure
 * 
 * NEXT AGENT: May need dark mode support
 */

/* ============================================
   MEGA MENU
   ============================================ */

.sp-mega-menu {
    position: relative;
}

.sp-mega-menu__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: var(--sp-radius-lg);
    color: var(--sp-text-secondary);
    cursor: pointer;
    transition: all var(--sp-transition-fast);
}

.sp-mega-menu__trigger:hover {
    background: var(--sp-blue-50);
    color: var(--sp-text-dark);
}

.sp-mega-menu__trigger:focus-visible {
    outline: 2px solid var(--sp-red);
    outline-offset: 2px;
}

.sp-mega-menu__trigger i {
    font-size: 1.25rem;
}

.sp-mega-menu__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 480px;
    max-width: calc(100vw - 32px);
    background: var(--sp-white);
    border-radius: var(--sp-radius-xl);
    box-shadow: var(--sp-shadow-lg);
    border: 1px solid var(--sp-card-border);
    z-index: 1000;
    overflow: hidden;
}

.sp-mega-menu__content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-space-1);
    padding: var(--sp-space-4);
}

.sp-mega-menu__section {
    padding: var(--sp-space-3);
}

.sp-mega-menu__section-title {
    font-size: 0.6875rem;
    font-weight: var(--sp-font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sp-text-muted);
    margin: 0 0 var(--sp-space-3);
    padding: 0 var(--sp-space-2);
}

.sp-mega-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-space-1);
}

.sp-mega-menu__item {
    display: flex;
    align-items: center;
    gap: var(--sp-space-3);
    padding: var(--sp-space-3) var(--sp-space-3);
    border-radius: var(--sp-radius-md);
    color: var(--sp-text-primary);
    text-decoration: none;
    transition: all var(--sp-transition-fast);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--sp-font-body);
    font-size: 0.9375rem;
}

.sp-mega-menu__item:hover {
    background: var(--sp-blue-50);
    color: var(--sp-text-dark);
}

.sp-mega-menu__item--active {
    background: var(--sp-red-lighter);
    color: var(--sp-red);
}

.sp-mega-menu__item--danger {
    color: var(--sp-danger);
}

.sp-mega-menu__item--danger:hover {
    background: var(--sp-danger-light);
    color: var(--sp-danger);
}

.sp-mega-menu__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--sp-blue-50);
    border-radius: var(--sp-radius-md);
    color: var(--sp-blue-600);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sp-mega-menu__item:hover .sp-mega-menu__icon {
    background: var(--sp-blue-100);
}

.sp-mega-menu__item--active .sp-mega-menu__icon {
    background: var(--sp-red);
    color: var(--sp-white);
}

.sp-mega-menu__item--danger .sp-mega-menu__icon {
    background: var(--sp-danger-light);
    color: var(--sp-danger);
}

.sp-mega-menu__label {
    font-weight: var(--sp-font-weight-normal);
}

.sp-mega-menu__divider {
    height: 1px;
    background: var(--sp-card-border);
    margin: var(--sp-space-2) 0;
}

.sp-mega-menu__form {
    margin: 0;
}

/* Mega Menu Transitions */
.sp-mega-menu__transition-enter {
    transition: all 150ms ease-out;
}

.sp-mega-menu__transition-enter-start {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
}

.sp-mega-menu__transition-enter-end {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sp-mega-menu__transition-leave {
    transition: all 100ms ease-in;
}

.sp-mega-menu__transition-leave-start {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sp-mega-menu__transition-leave-end {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
}

/* ============================================
   MOBILE FOOTER NAVIGATION
   ============================================ */

.sp-mobile-footer {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--sp-white);
    border-top: 1px solid var(--sp-card-border);
    box-shadow: 0 -4px 12px rgba(4, 22, 36, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.sp-mobile-footer__nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--sp-space-2) var(--sp-space-2);
}

.sp-mobile-footer__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--sp-space-2) var(--sp-space-3);
    min-width: 64px;
    background: transparent;
    border: none;
    border-radius: var(--sp-radius-lg);
    color: var(--sp-text-muted);
    text-decoration: none;
    transition: all var(--sp-transition-fast);
    cursor: pointer;
    font-family: var(--sp-font-body);
    -webkit-tap-highlight-color: transparent;
}

.sp-mobile-footer__item:hover,
.sp-mobile-footer__item:focus {
    color: var(--sp-text-dark);
}

.sp-mobile-footer__item--active {
    color: var(--sp-red);
}

.sp-mobile-footer__item--active .sp-mobile-footer__icon {
    background: var(--sp-red-lighter);
}

.sp-mobile-footer__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--sp-radius-full);
    font-size: 1.125rem;
    transition: all var(--sp-transition-fast);
}

.sp-mobile-footer__label {
    font-size: 0.6875rem;
    font-weight: var(--sp-font-weight-medium);
}

/* ============================================
   BOTTOM SHEET MENU (Mobile)
   ============================================ */

.sp-bottom-sheet {
    position: fixed;
    bottom: 60px; /* Above footer nav */
    left: 0;
    right: 0;
    max-height: 70vh;
    background: var(--sp-white);
    border-radius: var(--sp-radius-xl) var(--sp-radius-xl) 0 0;
    box-shadow: var(--sp-shadow-lg);
    z-index: 999;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.sp-bottom-sheet__handle {
    display: flex;
    justify-content: center;
    padding: var(--sp-space-3);
    position: sticky;
    top: 0;
    background: var(--sp-white);
    z-index: 1;
}

.sp-bottom-sheet__handle-bar {
    width: 36px;
    height: 4px;
    background: var(--sp-blue-200);
    border-radius: var(--sp-radius-full);
}

.sp-bottom-sheet__content {
    padding: 0 var(--sp-space-4) var(--sp-space-4);
}

.sp-bottom-sheet__section {
    margin-bottom: var(--sp-space-5);
}

.sp-bottom-sheet__section:last-child {
    margin-bottom: 0;
}

.sp-bottom-sheet__section-title {
    font-size: 0.75rem;
    font-weight: var(--sp-font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sp-text-muted);
    margin: 0 0 var(--sp-space-3);
}

.sp-bottom-sheet__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-space-3);
}

.sp-bottom-sheet__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-space-2);
    padding: var(--sp-space-4);
    background: var(--sp-blue-50);
    border-radius: var(--sp-radius-lg);
    color: var(--sp-text-primary);
    text-decoration: none;
    transition: all var(--sp-transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.sp-bottom-sheet__item:active {
    background: var(--sp-blue-100);
    transform: scale(0.98);
}

.sp-bottom-sheet__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--sp-white);
    border-radius: var(--sp-radius-lg);
    color: var(--sp-blue-600);
    font-size: 1.125rem;
}

.sp-bottom-sheet__label {
    font-size: 0.75rem;
    font-weight: var(--sp-font-weight-medium);
    text-align: center;
}

.sp-bottom-sheet__list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-space-1);
}

.sp-bottom-sheet__list-item {
    display: flex;
    align-items: center;
    gap: var(--sp-space-3);
    padding: var(--sp-space-4);
    background: transparent;
    border: none;
    border-radius: var(--sp-radius-md);
    color: var(--sp-text-primary);
    text-decoration: none;
    transition: all var(--sp-transition-fast);
    cursor: pointer;
    font-family: var(--sp-font-body);
    font-size: 0.9375rem;
    width: 100%;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.sp-bottom-sheet__list-item:hover,
.sp-bottom-sheet__list-item:active {
    background: var(--sp-blue-50);
}

.sp-bottom-sheet__list-item--danger {
    color: var(--sp-danger);
}

.sp-bottom-sheet__list-item--danger:hover,
.sp-bottom-sheet__list-item--danger:active {
    background: var(--sp-danger-light);
}

.sp-bottom-sheet__list-item i {
    width: 20px;
    text-align: center;
    color: var(--sp-text-muted);
}

.sp-bottom-sheet__list-item--danger i {
    color: var(--sp-danger);
}

.sp-bottom-sheet__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 22, 36, 0.4);
    z-index: 998;
}

/* Bottom Sheet Transitions */
.sp-bottom-sheet__transition-enter {
    transition: all 200ms ease-out;
}

.sp-bottom-sheet__transition-enter-start {
    opacity: 0;
    transform: translateY(100%);
}

.sp-bottom-sheet__transition-enter-end {
    opacity: 1;
    transform: translateY(0);
}

.sp-bottom-sheet__transition-leave {
    transition: all 150ms ease-in;
}

.sp-bottom-sheet__transition-leave-start {
    opacity: 1;
    transform: translateY(0);
}

.sp-bottom-sheet__transition-leave-end {
    opacity: 0;
    transform: translateY(100%);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Show mobile footer on small screens */
@media (max-width: 768px) {
    .sp-mobile-footer {
        display: block;
    }
    
    /* Add padding to body to account for fixed footer */
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0));
    }
    
    /* Hide desktop mega menu trigger on mobile */
    .sp-mega-menu {
        display: none;
    }
}

/* Adjust mega menu for smaller screens */
@media (max-width: 640px) {
    .sp-mega-menu__dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: var(--sp-radius-xl) var(--sp-radius-xl) 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .sp-mega-menu__content {
        grid-template-columns: 1fr;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .sp-mega-menu__dropdown {
        width: 400px;
    }
}




















