/* Mobile utilities — Audiotune */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Bottom navigation bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    border-top: 1px solid #262626;
    background: #131313;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 3.5rem;
}

.bottom-nav-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.25rem 0.125rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s ease;
}

.bottom-nav-item.active {
    color: #cb0e6e;
}

.bottom-nav-item svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.bottom-nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Admin mobile drawer */
#adminSidebarOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.5);
}

#adminSidebarOverlay.open {
    display: block;
}

@media (max-width: 767px) {
    #adminSidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 50;
        width: 16rem;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    #adminSidebar.open {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .author-card {
        padding: 1rem;
    }

    .toggle-track {
        width: 2.75rem;
        height: 1.5rem;
    }

    .toggle-track.on .toggle-dot {
        transform: translateX(1.25rem);
    }
}
