/* Mobile FAB & Menu Styles */
:root {
    --fab-size: 56px;
    --fab-bg: #ff4d00;
    /* Accent Color */
    --fab-color: #fff;
    --fab-z-index: 9999;
}

.mobile-fab-container {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    z-index: 2147483647;
    overflow: visible;
}

/* Hide on Desktop by default if you only want it for mobile */
/* Hide on Desktop by default if you only want it for mobile */
@media (min-width: 993px) {
    .mobile-fab-container {
        display: none !important;
    }
}

/* Hide standard nav on mobile for these reading pages */
@media (max-width: 992px) {
    #nav-container {
        display: none !important;
    }

    /* Reset padding-top which might be set by nav logic or body styles */
    body,
    .docs-shell {
        padding-top: 0 !important;
    }

    /* Ensure sidebar/content takes full height without nav gap */
    .docs-shell {
        height: auto;
        min-height: 100vh;
    }
}

.mobile-fab-btn {
    position: fixed;
    bottom: 30px;
    width: var(--fab-size);
    height: var(--fab-size);
    border-radius: 50%;
    background-color: var(--fab-bg);
    color: var(--fab-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2147483647;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s;
    -webkit-tap-highlight-color: transparent;
    display: flex !important;
    /* Force display */
}

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

.mobile-fab-btn i {
    font-size: 28px;
}

.mobile-fab-right {
    right: 20px;
}

.mobile-fab-left {
    left: 20px;
    background-color: #333;
    /* Different color for secondary action */
}

/* Slide-up Menu */
.mobile-fab-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: calc(var(--fab-z-index) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.mobile-fab-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-fab-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    background-color: #1a1a1a;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: calc(var(--fab-z-index) + 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-fab-menu.active {
    transform: translateY(0);
}

.mobile-fab-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-fab-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-fab-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
}

.mobile-fab-content {
    overflow-y: auto;
    padding: 10px 0;
    overscroll-behavior: contain;
}

/* List Styling */
.mobile-fab-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-fab-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-fab-list li:last-child {
    border-bottom: none;
}

.mobile-fab-list a {
    display: flex;
    flex-direction: column;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.mobile-fab-list a:active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--fab-bg);
}

.mobile-fab-list .nav-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.mobile-fab-list .nav-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    margin-left: 14px;
    /* Align with text roughly */
    font-family: var(--font-mono, monospace);
}

.mobile-fab-list .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--fab-bg);
    display: inline-block;
}

/* Icon rotation for active state if needed */
.mobile-fab-btn.active i {
    transform: rotate(45deg);
    /* Turn + to x */
    transition: transform 0.3s;
}