/* Documents Module Responsive Styles */

/* Mobile-first responsive design */
@media (max-width: 768px) {
    /* Dashboard Cards */
    .card.border-left-primary,
    .card.border-left-success,
    .card.border-left-info,
    .card.border-left-warning {
        border-left: none !important;
        border-top: 0.25rem solid;
    }
    
    .card.border-left-primary {
        border-top-color: #4e73df !important;
    }
    
    .card.border-left-success {
        border-top-color: #1cc88a !important;
    }
    
    .card.border-left-info {
        border-top-color: #36b9cc !important;
    }
    
    .card.border-left-warning {
        border-top-color: #f6c23e !important;
    }
    
    /* Statistics Cards Mobile */
    .stats-card .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-card .stats-icon {
        margin-top: 1rem;
    }
    
    /* Charts Mobile */
    .chart-area {
        height: 6rem !important;
    }
    
    .chart-pie {
        height: 8rem !important;
    }
    
    /* Tables Mobile */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Hide less important columns on mobile */
    .table th:nth-child(3),
    .table td:nth-child(3),
    .table th:nth-child(4),
    .table td:nth-child(4),
    .table th:nth-child(7),
    .table td:nth-child(7),
    .table th:nth-child(8),
    .table td:nth-child(8) {
        display: none;
    }
    
    /* Action buttons mobile */
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Modal mobile */
    .modal-dialog.modal-xl {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-body .row .col-lg-6 {
        margin-bottom: 1rem;
    }
    
    /* Form controls mobile */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Filter form mobile */
    .card-body .row .col-lg-3,
    .card-body .row .col-lg-2,
    .card-body .row .col-lg-1 {
        margin-bottom: 1rem;
    }
    
    /* Button groups mobile */
    .btn-toolbar .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-toolbar .btn-group .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    /* Page header mobile */
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .btn-toolbar {
        margin-top: 1rem;
        width: 100%;
    }
    
    /* Icon circles mobile */
    .icon-circle {
        height: 1.5rem;
        width: 1.5rem;
    }
    
    /* Activity items mobile */
    .d-flex.align-items-center.mb-3 {
        flex-direction: column;
        text-align: center;
    }
    
    .d-flex.align-items-center.mb-3 .mr-3 {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
    
    /* Badge mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .card.border-left-primary,
    .card.border-left-success,
    .card.border-left-info,
    .card.border-left-warning {
        border-left-width: 0.2rem;
    }
    
    .chart-area {
        height: 8rem;
    }
    
    .chart-pie {
        height: 12rem;
    }
    
    .table th:nth-child(8),
    .table td:nth-child(8) {
        display: none;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .chart-area {
        height: 12rem;
    }
    
    .chart-pie {
        height: 18rem;
    }
}

/* Print styles */
@media print {
    .btn,
    .btn-toolbar,
    .modal,
    .sidebar,
    .admin-header {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 12px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .chart-area,
    .chart-pie {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid;
    }
    
    .badge {
        border: 1px solid;
    }
}

/* Light mode support - Force Light Theme */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #ffffff !important;
        color: #212529 !important;
    }
    
    .table {
        color: #212529 !important;
    }
    
    .table th {
        background-color: #f8f9fa !important;
        color: #212529 !important;
    }
    
    .table-striped tbody tr:nth-of-type(odd) {
        background-color: #ffffff !important;
    }
}
