/* ==========================================
   MOBILE TERMINAL DRAWER NAVIGATION
   Bottom-anchored expandable terminal menu
   ========================================== */

/* Hide by default - only show on mobile */
.mobile-terminal-drawer {
    display: none;
}

@media (max-width: 768px) {
    .mobile-terminal-drawer {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Collapsed Tab State */
    .mobile-terminal-drawer.collapsed {
        transform: translateY(calc(70vh - 56px));
    }

    /* Expanded Drawer State */
    .mobile-terminal-drawer.expanded {
        transform: translateY(0);
    }

    /* Terminal Tab (Always Visible) */
    .terminal-tab {
        height: 56px;
        background: linear-gradient(180deg, rgba(10, 14, 26, 0.98) 0%, rgba(10, 14, 26, 0.95) 100%);
        border-top: 2px solid #00f5ff;
        box-shadow: 0 -4px 20px rgba(0, 245, 255, 0.2);
        padding: 0 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        user-select: none;
    }

    .terminal-tab-left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: 'Courier New', monospace;
        font-size: 14px;
        color: #00f5ff;
        letter-spacing: 0.05em;
    }

    .terminal-prompt {
        color: #00f5ff;
    }

    .terminal-cursor {
        display: inline-block;
        width: 8px;
        height: 16px;
        background: #00f5ff;
        animation: cursorBlink 1s step-end infinite;
    }

    @keyframes cursorBlink {
        0%, 49% { opacity: 1; }
        50%, 100% { opacity: 0; }
    }

    .terminal-tab-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: 'Courier New', monospace;
        font-size: 12px;
        color: rgba(0, 255, 127, 0.8);
    }

    .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #00ff7f;
        box-shadow: 0 0 8px rgba(0, 255, 127, 0.6);
        animation: statusPulse 2s ease-in-out infinite;
    }

    @keyframes statusPulse {
        0%, 100% {
            opacity: 1;
            box-shadow: 0 0 8px rgba(0, 255, 127, 0.6);
        }
        50% {
            opacity: 0.6;
            box-shadow: 0 0 15px rgba(0, 255, 127, 0.9);
        }
    }

    /* Drawer Content Container */
    .terminal-drawer-content {
        height: 70vh;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 245, 255, 0.15);
        padding: 1.5rem;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 245, 255, 0.3) transparent;
    }

    .terminal-drawer-content::-webkit-scrollbar {
        width: 6px;
    }

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

    .terminal-drawer-content::-webkit-scrollbar-thumb {
        background: rgba(0, 245, 255, 0.3);
        border-radius: 3px;
    }

    /* Drawer Header */
    .drawer-header {
        font-family: 'Courier New', monospace;
        font-size: 16px;
        color: #00f5ff;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(0, 245, 255, 0.2);
    }

    /* Menu Items */
    .terminal-menu-list {
        list-style: none;
        padding: 0;
        margin: 0 0 1.5rem 0;
    }

    .terminal-menu-list li {
        margin-bottom: 0.5rem;
    }

    .terminal-menu-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        padding: 0 1rem;
        background: rgba(26, 31, 53, 0.3);
        border: 1px solid rgba(0, 245, 255, 0.2);
        border-left: 3px solid transparent;
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .terminal-menu-link:hover,
    .terminal-menu-link:active {
        background: rgba(0, 245, 255, 0.1);
        border-left-color: #00f5ff;
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.15);
    }

    .menu-link-left {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .menu-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 245, 255, 0.1);
        border-radius: 8px;
        color: #00f5ff;
        font-size: 18px;
        transition: all 0.3s ease;
    }

    .terminal-menu-link:hover .menu-icon {
        background: rgba(0, 245, 255, 0.2);
        box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
    }

    .menu-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .menu-command {
        font-family: 'Courier New', monospace;
        font-size: 13px;
        color: #00f5ff;
        font-weight: 500;
    }

    .menu-description {
        font-family: 'Inter', sans-serif;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.6);
    }

    /* Divider */
    .terminal-divider {
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.3), transparent);
        margin: 1.5rem 0;
    }

    /* CTA Button */
    .drawer-cta {
        display: block;
        width: 100%;
        padding: 1rem;
        background: linear-gradient(135deg, #00f5ff 0%, #00c8d4 100%);
        color: #0a0e1a;
        font-family: 'Inter', sans-serif;
        font-size: 15px;
        font-weight: 600;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        border: none;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 245, 255, 0.3);
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .drawer-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 30px rgba(0, 245, 255, 0.5);
    }

    /* Backdrop */
    .terminal-drawer-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .terminal-drawer-backdrop.active {
        display: block;
        opacity: 1;
    }

    /* Small Mobile Adjustments */
    @media (max-width: 480px) {
        .terminal-drawer-content {
            height: 75vh;
            padding: 1rem;
        }

        .mobile-terminal-drawer.collapsed {
            transform: translateY(calc(75vh - 56px));
        }

        .terminal-menu-link {
            height: 56px;
        }

        .menu-icon {
            width: 36px;
            height: 36px;
            font-size: 16px;
        }

        .menu-command {
            font-size: 12px;
        }

        .menu-description {
            font-size: 10px;
        }
    }
}

/* Accessibility */
.terminal-menu-link:focus {
    outline: 2px solid #00f5ff;
    outline-offset: 2px;
}

.terminal-tab:focus {
    outline: 2px solid #00f5ff;
    outline-offset: -2px;
}
