/**
 * Mobile-specific styles for trading dashboard
 * Optimized for devices with width <= 768px
 */

@media (max-width: 768px) {
    /* Stack session header items vertically on mobile */
    #session-header .flex {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    #session-header .flex > div {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Last child (close button) should not have bottom margin */
    #session-header .flex > button:last-child,
    #session-header .flex > div:last-child {
        margin-bottom: 0;
    }

    /* Full-width ticker cards on mobile */
    #ticker-grid {
        grid-template-columns: 1fr !important;
    }

    /* Modal takes full screen on mobile */
    [x-data] > div[class*="max-w-2xl"] {
        max-width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100vh;
    }

    /* Larger touch targets for better mobile UX */
    button,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    /* Adjust modal padding on mobile */
    @supports (-webkit-touch-callout: none) {
        /* iOS Safari specific */
        [x-data] > div[class*="p-6"] {
            padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
        }
    }

    /* Toast notifications adjust position on mobile */
    [x-data*="showToast"] {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: calc(100vw - 2rem);
    }

    /* Add ticker button full width on mobile */
    .container > div > button[class*="bg-purple-600"] {
        width: 100%;
        justify-content: center;
    }
}

/* Tablet-specific optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Two-column grid on tablets */
    #ticker-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
