/* ============================================
   MOBILE BOTTOM NAVIGATION SYSTEM
   NFL Mock Draft 2026 - Mobile Optimized
   ============================================ */

/* Only show on mobile devices */
@media (max-width: 768px) {
    /* Hide desktop navigation on mobile */
    .nav-container {
        display: none !important;
    }

    /* Enable smooth scrolling on mobile */
    html, body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: auto;
    }

    /* Adjust main content padding for bottom nav */
    .main-content {
        padding-bottom: 90px !important;
        padding-left: 1rem;
        padding-right: 1rem;
        /* Let the body handle scrolling */
        overflow: visible;
        touch-action: auto;
    }

    /* Adjust export bar for mobile */
    .export-bar {
        padding: 0.5rem;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .export-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .export-btn span {
        display: none;
    }

    /* ============================================
       BOTTOM NAVIGATION BAR
       ============================================ */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom, 0);
        transition: transform 0.3s ease;
    }

    /* Hide when keyboard is open */
    @media (max-height: 500px) {
        .mobile-bottom-nav {
            transform: translateY(100%);
        }
        
        .fab-container {
            transform: translateY(100px) !important;
        }
    }

    [data-theme="light"] .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.95);
        border-top-color: rgba(0, 0, 0, 0.1);
    }

    .mobile-bottom-nav-items {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 65px;
        max-width: 500px;
        margin: 0 auto;
        padding: 0 0.5rem;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 56px;
        min-height: 48px;
        padding: 0.5rem 0.75rem;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        position: relative;
        transition: all 0.2s ease;
        border-radius: 12px;
    }

    .mobile-nav-item:active {
        transform: scale(0.95);
        background: rgba(0, 212, 255, 0.1);
    }

    .mobile-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
        transition: all 0.2s ease;
    }

    .mobile-nav-item span {
        font-size: 0.65rem;
        font-weight: 500;
        letter-spacing: 0.3px;
    }

    .mobile-nav-item.active {
        color: var(--accent);
    }

    .mobile-nav-item.active::before {
        content: '';
        position: absolute;
        top: -8px;
        width: 4px;
        height: 4px;
        background: var(--accent);
        border-radius: 50%;
    }

    .mobile-nav-item.active i {
        transform: translateY(-2px);
        filter: drop-shadow(0 2px 4px rgba(0, 212, 255, 0.4));
    }

    /* Create button styling */
    .mobile-nav-item.create-btn {
        position: relative;
    }

    .mobile-nav-item.create-btn i {
        background: linear-gradient(135deg, var(--accent), var(--success));
        color: var(--primary);
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0.5rem;
        box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
        transition: all 0.3s ease;
    }

    .mobile-nav-item.create-btn:active i {
        transform: scale(0.95);
        box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
    }

    .mobile-nav-item.create-btn span {
        font-weight: 600;
        color: var(--accent);
    }

    /* Notification badge */
    .nav-badge {
        position: absolute;
        top: 4px;
        right: 8px;
        background: var(--danger);
        color: white;
        font-size: 0.6rem;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        border: 2px solid var(--primary);
    }

    /* ============================================
       FLOATING ACTION BUTTON (FAB)
       ============================================ */
    .fab-container {
        position: fixed;
        bottom: 85px;
        right: 16px;
        z-index: 999;
        transition: transform 0.3s ease;
    }

    .fab-container.hidden {
        transform: translateY(100px);
    }

    .fab {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent), var(--success));
        border: none;
        color: var(--primary);
        font-size: 1.5rem;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        position: relative;
    }

    .fab:active {
        transform: scale(0.95);
        box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
    }

    .fab.expanded {
        transform: rotate(45deg);
    }

    .fab-label {
        position: absolute;
        right: 70px;
        background: var(--secondary);
        color: var(--text-primary);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-size: 0.8rem;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);
        transition: all 0.2s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .fab-label::after {
        content: '';
        position: absolute;
        right: -6px;
        top: 50%;
        transform: translateY(-50%);
        border-width: 6px 0 6px 6px;
        border-style: solid;
        border-color: transparent transparent transparent var(--secondary);
    }

    .fab-container:hover .fab-label {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    /* FAB Mini Actions */
    .fab-menu {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .fab-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .fab-mini {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .fab-mini-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--secondary);
        border: 1px solid var(--border);
        color: var(--text-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .fab-mini-btn:active {
        transform: scale(0.95);
    }

    .fab-mini-label {
        background: var(--secondary);
        color: var(--text-primary);
        padding: 0.4rem 0.75rem;
        border-radius: 6px;
        font-size: 0.75rem;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    /* ============================================
       CONTEXTUAL ACTION BAR
       ============================================ */
    .context-action-bar {
        position: fixed;
        bottom: 65px;
        left: 0;
        right: 0;
        background: rgba(18, 18, 26, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
        padding: 0.5rem 1rem;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .context-action-bar.visible {
        transform: translateY(0);
    }

    [data-theme="light"] .context-action-bar {
        background: rgba(255, 255, 255, 0.98);
        border-top-color: rgba(0, 0, 0, 0.1);
    }

    .context-actions {
        display: flex;
        justify-content: space-around;
        align-items: center;
        max-width: 500px;
        margin: 0 auto;
    }

    .context-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.5rem 0.75rem;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        font-size: 0.65rem;
        cursor: pointer;
        border-radius: 8px;
        transition: all 0.2s ease;
        min-width: 56px;
    }

    .context-action:active {
        background: rgba(0, 212, 255, 0.1);
        color: var(--accent);
    }

    .context-action i {
        font-size: 1.1rem;
    }

    .context-action.primary {
        background: linear-gradient(135deg, var(--accent), var(--success));
        color: var(--primary);
        padding: 0.6rem 1.25rem;
        border-radius: 20px;
        font-weight: 600;
    }

    .context-action.primary:active {
        opacity: 0.9;
    }

    /* ============================================
       BOTTOM SHEET / MORE MENU
       ============================================ */
    .bottom-sheet-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 1100;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .bottom-sheet-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .bottom-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--secondary);
        border-radius: 24px 24px 0 0;
        z-index: 1101;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
    }

    .bottom-sheet.open {
        transform: translateY(0);
    }

    [data-theme="light"] .bottom-sheet {
        background: #ffffff;
    }

    /* Drag Handle */
    .sheet-drag-handle {
        width: 100%;
        padding: 12px 0;
        display: flex;
        justify-content: center;
        cursor: grab;
    }

    .sheet-drag-handle:active {
        cursor: grabbing;
    }

    .drag-indicator {
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    [data-theme="light"] .drag-indicator {
        background: rgba(0, 0, 0, 0.2);
    }

    /* Sheet Header */
    .sheet-header {
        padding: 0 1.5rem 1rem;
        border-bottom: 1px solid var(--border);
    }

    .sheet-title {
        font-family: 'Oswald', sans-serif;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    /* Sheet Content */
    .sheet-content {
        flex: 1;
        overflow-y: auto;
        padding: 1rem 0;
        -webkit-overflow-scrolling: touch;
    }

    .sheet-section {
        padding: 0.5rem 1.5rem;
    }

    .sheet-section-title {
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        margin-bottom: 0.75rem;
        padding: 0 0.5rem;
    }

    .sheet-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.875rem 0.75rem;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        color: var(--text-primary);
        background: transparent;
        border: none;
        width: 100%;
        text-align: left;
    }

    .sheet-item:active {
        background: var(--card-bg);
    }

    .sheet-item i {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: var(--card-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        color: var(--accent);
        flex-shrink: 0;
    }

    .sheet-item-content {
        flex: 1;
    }

    .sheet-item-title {
        font-size: 0.95rem;
        font-weight: 500;
        margin-bottom: 0.15rem;
    }

    .sheet-item-subtitle {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }

    .sheet-divider {
        height: 1px;
        background: var(--border);
        margin: 0.75rem 1.5rem;
    }

    /* Toggle Switch */
    .sheet-toggle {
        position: relative;
        width: 48px;
        height: 26px;
        background: var(--border);
        border-radius: 13px;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .sheet-toggle.active {
        background: var(--accent);
    }

    .sheet-toggle::after {
        content: '';
        position: absolute;
        top: 3px;
        left: 3px;
        width: 20px;
        height: 20px;
        background: white;
        border-radius: 50%;
        transition: transform 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .sheet-toggle.active::after {
        transform: translateX(22px);
    }

    /* ============================================
       QUICK ACTIONS DRAWER
       ============================================ */
    .quick-actions-drawer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(18, 18, 26, 0.98) 0%, var(--secondary) 100%);
        backdrop-filter: blur(20px);
        border-radius: 24px 24px 0 0;
        z-index: 1101;
        transform: translateY(calc(100% - 60px));
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
        box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
    }

    .quick-actions-drawer.open {
        transform: translateY(0);
    }

    [data-theme="light"] .quick-actions-drawer {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
    }

    .drawer-handle {
        padding: 16px 0 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
    }

    .drawer-pill {
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        margin-bottom: 8px;
    }

    [data-theme="light"] .drawer-pill {
        background: rgba(0, 0, 0, 0.2);
    }

    .drawer-label {
        font-size: 0.75rem;
        color: var(--text-secondary);
        font-weight: 500;
    }

    .drawer-content {
        padding: 1rem 1.5rem;
    }

    .drawer-title {
        font-family: 'Oswald', sans-serif;
        font-size: 1.1rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    .quick-action-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .quick-action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: 16px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .quick-action-item:active {
        background: rgba(0, 212, 255, 0.1);
        border-color: var(--accent);
        transform: scale(0.98);
    }

    .quick-action-item i {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--accent), var(--success));
        color: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
    }

    .quick-action-item span {
        font-size: 0.75rem;
        font-weight: 500;
        text-align: center;
    }

    /* ============================================
       SWIPEABLE PICK CARDS
       ============================================ */
    .swipeable-pick-container {
        position: relative;
        overflow: visible;
    }

    .pick-card-swipeable {
        transition: transform 0.3s ease;
    }

    .pick-card-swipeable.swiping-left {
        transform: translateX(-50px);
        opacity: 0.7;
    }

    .pick-card-swipeable.swiping-right {
        transform: translateX(50px);
        opacity: 0.7;
    }

    .swipe-indicator {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
        opacity: 0;
        transition: opacity 0.2s ease;
        pointer-events: none;
    }

    .swipe-indicator.left {
        left: 20px;
        background: var(--accent);
    }

    .swipe-indicator.right {
        right: 20px;
        background: var(--success);
    }

    .pick-card-swipeable.swiping-left ~ .swipe-indicator.right,
    .pick-card-swipeable.swiping-right ~ .swipe-indicator.left {
        opacity: 1;
    }

    /* ============================================
       PICK DETAILS MODAL
       ============================================ */
    .pick-details-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        display: flex;
        align-items: flex-end;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .pick-details-modal.open {
        opacity: 1;
        visibility: visible;
    }

    .pick-details-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
    }

    .pick-details-content {
        position: relative;
        background: var(--secondary);
        border-radius: 24px 24px 0 0;
        width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
    }

    .pick-details-modal.open .pick-details-content {
        transform: translateY(0);
    }

    [data-theme="light"] .pick-details-content {
        background: #ffffff;
    }

    /* Navigation arrows in modal */
    .modal-nav {
        display: flex;
        justify-content: space-between;
        padding: 1rem;
        position: sticky;
        top: 0;
        background: var(--secondary);
        z-index: 10;
        border-bottom: 1px solid var(--border);
    }

    [data-theme="light"] .modal-nav {
        background: #ffffff;
    }

    .modal-nav-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--card-bg);
        border: 1px solid var(--border);
        color: var(--text-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .modal-nav-btn:active {
        background: var(--accent);
        color: var(--primary);
    }

    .modal-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 71, 87, 0.2);
        border: none;
        color: var(--danger);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1rem;
    }

    /* ============================================
       TOUCH FEEDBACK
       ============================================ */
    .touch-feedback {
        position: relative;
        overflow: hidden;
    }

    .touch-feedback::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        pointer-events: none;
    }

    .touch-feedback:active::after {
        width: 200px;
        height: 200px;
        opacity: 1;
    }

    /* Haptic feedback indicator */
    .haptic-indicator {
        position: fixed;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.75rem;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 2000;
    }

    .haptic-indicator.show {
        opacity: 1;
    }

    /* ============================================
       SCROLL INDICATOR
       ============================================ */
    .scroll-indicator {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--border);
        z-index: 1001;
    }

    .scroll-progress {
        height: 100%;
        background: linear-gradient(90deg, var(--accent), var(--success));
        width: 0%;
        transition: width 0.1s ease;
    }

    /* ============================================
       PULL TO REFRESH
       ============================================ */
    .pull-to-refresh {
        position: absolute;
        top: -60px;
        left: 0;
        right: 0;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease;
    }

    .pull-to-refresh-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--card-bg);
        border: 2px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent);
        transition: transform 0.3s ease;
    }

    .pull-to-refresh.pulling .pull-to-refresh-icon {
        transform: rotate(180deg);
    }

    .pull-to-refresh.refreshing .pull-to-refresh-icon {
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
}

/* Desktop: Hide mobile navigation elements */
@media (min-width: 769px) {
    .mobile-bottom-nav,
    .fab-container,
    .context-action-bar,
    .bottom-sheet-overlay,
    .bottom-sheet,
    .quick-actions-drawer,
    .pick-details-modal,
    .scroll-indicator,
    .haptic-indicator {
        display: none !important;
    }
}
