/* AVCKS v3.0 - Mobile Responsive Styles */
/* Applies at max-width: 1024px */

#app-container {
    grid-template-columns: 1fr;
    grid-template-rows: 56px auto auto 1fr;
    grid-template-areas: "header" "main" "sidebar" "footer";
}

.hud-main {
    height: 260px;
    min-height: 200px;
}

.hud-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px;
    border-left: none;
    border-top: 1px solid var(--border-color);
    background: var(--bg-glass-solid);
    overflow-x: auto;
    overflow-y: hidden;
}

.widget {
    flex: 1 1 140px;
    min-width: 120px;
    padding: 8px 10px;
}

#identity-widget {
    flex: 2 1 200px;
}

.hud-footer {
    height: 240px;
    min-height: 120px;
}

/* Larger touch targets */
.icon-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
}

#cmd-input {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 10px 14px;
}

.hub-category-grid {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
}

.hub-item {
    padding: 10px 6px;
}

.search-window {
    width: 95vw;
    height: 75vh;
    left: 2.5vw !important;
    top: 10vh !important;
    transform: none !important;
}

.profile-advance {
    width: 95vw !important;
    left: 2.5vw !important;
    top: 5vh !important;
    transform: none !important;
}

.auth-card {
    width: 90vw;
    padding: 30px 20px;
}

/* Resize handle bigger for touch */
#resize-handle {
    height: 16px;
    top: -8px;
}

#resize-handle::after {
    width: 50px;
    height: 4px;
    margin-top: 6px;
}

/* Small screens */
@media (max-width: 480px) {
    .hud-main {
        height: 200px;
    }

    .hud-sidebar {
        flex-direction: column;
        max-height: 120px;
        overflow-y: auto;
    }

    .widget {
        flex: none;
        width: 100%;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .version {
        display: none;
    }

    .hub-container {
        width: 95vw;
    }
}
