/* app/static/css/style.css */

body {
    padding-top: 50px; /* لترك مساحة للشريط العلوي إذا كان موجودًا */
    background-color: #f8f9fa;
}

/* إضافة تنسيق بسيط لإظهار الزر بوضوح إذا كان مخفياً */
.btn-info {
    display: inline-block !important; 
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Tablet and below */
@media (max-width: 992px) {
    /* Adjust container padding */
    .container, .container-fluid, .container-xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Make tables responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.875rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    /* Adjust body padding for mobile navbar */
    body {
        padding-top: 80px;
    }
    
    /* Make all cards stack vertically */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Improve form readability */
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    /* Make buttons full width on mobile for better touch targets */
    .btn-block-mobile {
        width: 100%;
        display: block;
    }
    
    /* Adjust table for mobile */
    table {
        font-size: 0.75rem;
    }
    
    table th, table td {
        padding: 0.5rem;
    }
    
    /* Make action buttons in tables more compact */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Improve alert visibility */
    .alert {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
    
    /* Stack flex items on mobile */
    .d-flex {
        flex-wrap: wrap;
    }
    
    /* Improve badge visibility */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }
    
    /* Better spacing for cards */
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 576px) {
    /* Further reduce font sizes */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    /* Make inputs more touch-friendly */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    /* Compact navigation */
    .navbar-brand img {
        height: 40px !important;
    }
    
    /* Better button spacing */
    .btn {
        margin-bottom: 0.5rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Print-friendly styles (keep existing print styles working) */
@media print {
    .no-print {
        display: none !important;
    }
}