/* Custom styles for mobile responsiveness */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Use viewport height */
    background-color: #f8f9fa;
    font-size: 0.8rem;
}

.container {
    flex: 1; /* This makes the container grow to fill available space */
    padding-bottom: 20px; /* Add some space before footer */
}

footer {
    margin-top: auto; /* Pushes footer to bottom */
    background-color: #343a40;
    color: white;
    padding: 15px 0;
    width: 100%;
    position: fixed; /* Fixes the footer at the bottom */
    bottom: 0; /* Aligns it at the bottom */
}

.navbar {
    position: fixed; /* Fix the navbar at the top */
    top: 0; /* Align it to the top */
    left: 0; /* Align it to the left */
    right: 0; /* Align it to the right */
    z-index: 1000; /* Ensure it stays above other content */
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.badge {
    font-size: 0.8em;
}

.btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.btn-group .btn {
    margin-bottom: 0;
    flex-grow: 1;
}

/* Adjust modal for mobile */
.modal-dialog {
    margin: 1rem auto;
}

/* Make tables more compact on mobile */
@media (max-width: 768px) {
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Ensure chart container is responsive */
#bloodTypeChart {
    width: 100% !important;
    height: auto !important;
    max-height: 300px;
}