/* SL24 Report - Responsive CSS */
/* Mobile-first responsive design for Django SL24 Report application */

/* Base responsive utilities */
.container-responsive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-hide {
    display: table-cell;
}

.mobile-show {
    display: none;
}

/* Responsive grid system */
.row-responsive {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-responsive {
    flex: 1;
    padding: 0 15px;
    margin-bottom: 20px;
}

/* Button responsive styles */
.btn-responsive {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary-responsive {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary-responsive:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

/* Card responsive styles */
.card-responsive {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Form responsive styles */
.form-responsive {
    max-width: 100%;
}

.form-group-responsive {
    margin-bottom: 20px;
}

.form-group-responsive label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control-responsive {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Mobile breakpoint (max-width: 768px) */
@media (max-width: 768px) {
    .container-responsive {
        padding: 0 10px;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-show {
        display: block !important;
    }
    
    .row-responsive {
        flex-direction: column;
        margin: 0;
    }
    
    .col-responsive {
        padding: 0;
        margin-bottom: 15px;
    }
    
    /* Mobile tables */
    .table-responsive {
        font-size: 12px;
    }
    
    .table-responsive table {
        min-width: 100%;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    /* Mobile buttons */
    .btn-responsive {
        width: 100%;
        margin-bottom: 10px;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    /* Mobile cards */
    .card-responsive {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* Mobile forms */
    .form-control-responsive {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile navigation */
    .nav-responsive {
        flex-direction: column;
    }
    
    .nav-responsive li {
        margin-bottom: 10px;
    }
    
    .nav-responsive a {
        display: block;
        padding: 12px;
        text-align: center;
    }
    
    /* Mobile stats */
    .stats-responsive {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item-responsive {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #dee2e6;
        text-align: center;
    }
    
    /* Mobile charts */
    .chart-responsive {
        height: 250px;
        margin-bottom: 20px;
    }
    
    /* Mobile header */
    .header-responsive {
        text-align: center;
        padding: 15px 10px;
    }
    
    .header-responsive .logo {
        max-width: 120px;
        margin-bottom: 10px;
    }
    
    /* Mobile filters */
    .filters-responsive {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group-responsive {
        width: 100%;
    }
}

/* Tablet breakpoint (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container-responsive {
        padding: 0 20px;
    }
    
    .row-responsive {
        margin: 0 -10px;
    }
    
    .col-responsive {
        padding: 0 10px;
    }
    
    .table-responsive {
        font-size: 13px;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 10px 6px;
    }
    
    .btn-responsive {
        padding: 10px 16px;
    }
    
    .card-responsive {
        padding: 18px;
    }
}

/* Large desktop breakpoint (min-width: 1200px) */
@media (min-width: 1200px) {
    .container-responsive {
        max-width: 1400px;
    }
    
    .card-responsive {
        padding: 24px;
    }
}

/* Print styles */
@media print {
    .mobile-hide,
    .btn-responsive,
    .nav-responsive {
        display: none !important;
    }
    
    .card-responsive {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table-responsive {
        overflow: visible;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-responsive {
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .btn-responsive,
    .card-responsive {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card-responsive {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .form-control-responsive {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .stat-item-responsive {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
}
