/* =============================================================================
   utilities/responsive.css - Responsive Design Media Queries
   ============================================================================= */

@media (max-width: 1200px) {
    .test-layout {
        flex-direction: column;
    }
    
    .test-sidebar {
        width: 100%;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .test-sidebar .card {
        min-width: 350px;
    }
    
    .modal-content {
        width: 98%;
        height: 95vh;
        margin: 2.5vh auto;
    }
    
    .trade-modal-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .parameter-list {
        justify-content: center;
    }
    
    .trade-export-controls {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .app-title {
        align-items: center;
        text-align: center;
    }
    
    .tab-navigation {
        justify-content: center;
    }
    
    .tab-btn {
        margin-left: 4px;
        margin-right: 4px;
    }
    
    .sidebar-tabs {
        flex-direction: column;
    }
    
    .sidebar-tab-btn {
        border-bottom: 1px solid #e2e8f0;
        border-right: none;
    }
    
    .sidebar-tab-btn.active {
        border-bottom-color: #e2e8f0;
        border-left: 3px solid #585858;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .metric-value {
        font-size: 1.1em;
    }
    
    .metric-label {
        font-size: 0.65em;
    }
    
    .test-layout {
        flex-direction: column;
        overflow-y: auto;
    }
    
    .test-sidebar {
        width: 100%;
        max-height: none;
        flex-direction: column;
        overflow-y: visible;
    }
    
    .param-grid {
        grid-template-columns: 1fr;
    }
    
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-controls, 
    .export-controls {
        justify-content: center;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .results-table {
        overflow-x: auto;
    }
    
    .results-table table {
        min-width: 800px;
    }
    
    .parameter-tooltip {
        min-width: 250px;
        max-width: calc(100vw - 40px);
        font-size: 12px;
    }
    
    .tooltip-header {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .tooltip-content {
        padding: 12px;
        max-height: 200px;
    }
    
    .tooltip-param {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .param-value {
        font-size: 11px;
        padding: 3px 6px;
        min-width: 50px;
    }
    
    .modal-body {
        padding: 15px 20px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5em;
    }
    
    .trade-table th,
    .trade-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .parameter-list {
        flex-direction: column;
        gap: 8px;
    }
    
    .param-item {
        text-align: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .trade-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .CodeMirror {
        font-size: 12px;
    }
    
    .editor-controls {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .editor-controls .control-btn {
        font-size: 11px;
        padding: 6px 12px;
        margin-left: 0;
    }
    
    .CodeMirror-fullscreen {
        font-size: 14px;
    }
    
    /* Mobile Symbol Selector */
    .dropdown-item {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .coin-symbol {
        margin-right: 0;
        font-size: 14px;
    }
    
    .coin-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.5em;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px;
        font-size: 12px;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}