/* Reset and base layout */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: "Poppins", sans-serif;
    color: #3f4750;
    font-size: 0.9rem;
}

body {
    background-color: #d9e4f2;
}

/* Main layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure the layout spans the full height of the viewport */
}

.layout .header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensure buttons are visible */
    padding: 0 20px;
    background-color: #15001d;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.layout .content {
    flex-grow: 1; /* Allow content to take up remaining space */
    padding: 20px;
    margin-left: 250px; /* Leave space for the sidebar */
    margin-top: 56px; /* Leave space for the header */
    overflow-y: auto;
}

.layout .footer {
    text-align: center;
    padding: 10px;
    background-color: #15001d;
    color: white;
    width: 100%;
}

/* Sidebar styling */
.sidebar {
    width: 250px;
    height: calc(100vh - 56px); /* Full height minus header */
    background-color: #15001d; /* Match footer color */
    color: white; /* Improve text visibility */
    position: fixed;
    top: 56px; /* Align with the header */
    left: 0;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2); /* Add shadow for better appearance */
}

.sidebar .sidebar-header {
    height: 56px; /* Match header height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a0e2d; /* Slightly darker shade */
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #3f4750;
}

.sidebar .menu {
    flex-grow: 1;
    padding: 10px 0;
}

.sidebar .menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Sidebar button styling */
.sidebar .menu .menu-item {
    margin-bottom: 10px;
}

.sidebar .menu .menu-item button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 95%;
    padding: 6px 10px;
    color: #dee2ec;
    background-color: #1a0e2d;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 2px 4px #d9e4f2;
    border: #545454 1px solid;
}

.sidebar .menu .menu-item form {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar .menu .menu-item button i {
    margin-right: 12px; /* Add spacing between icon and text */
    font-size: 1.2rem;
    color: #dee2ec; /* Icon color matches text */
}

.sidebar .menu .menu-item button:hover {
    background-color: #1e4271; /* Highlight color on hover */
    color: white; /* Change text color on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
}

.sidebar .menu .menu-item button:active {
    background-color: #1e4271; /* Slightly darker shade for active state */
    color: white; /* Maintain white text color */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); /* Inset shadow for pressed effect */
}

.sidebar .menu .menu-item.active button {
    background-color: #1e4271; /* Active button background */
    color: white; /* Active button text color */
    font-weight: bold; /* Bold text for active button */
    box-shadow: 0 4px 8px rgb(217, 228, 242); /* Stronger shadow for active button */
}

/* Responsive adjustments */
@media (max-width: 992px) {

    .sidebar.show {
        display: block;
        position: absolute;
        z-index: 1050;
    }

    .layout .content {
        margin-left: 0;
    }
}

/* Header and Footer Colors */
.bg-header-primary {
    background-color: #15001d !important;
}

.bg-footer-primary {
    background-color: #15001d !important;
}

/* Card Styling */
.card {
    border-radius: 8px;
}

.card-header {
    border-radius: 8px 8px 0 0;
}


.bg-primary {
    background-color: #1e4271 !important;
    color: white !important;
}

.btn-bg-primary {
    background-color: #1e4271 !important;
    color: white !important;
}

.btn-bg-primary:hover {
    background-color: #d9e4f2 !important;
    color: black !important;
}

/* Button Styling */
.btn-primary {
    background-color: #15001d !important;
    border-color: #15001d !important;
}

.btn-primary:hover {
    background-color: #1a0e2d !important;
    border-color: #1a0e2d !important;
}

/* Image Styling */
.object-fit-cover {
    object-fit: contain; /* Ensure the image fits within its container */
    width: 70%;
    height: auto;
    border-radius: 8px; /* Add rounded corners for consistency */
    background-color: #f8f9fa; /* Add a background color to fill empty space */
}

/* Transition Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .card {
        margin: 10px;
    }

    .card-body {
        padding: 15px;
    }

    .btn {
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .card {
        margin: 10px;
    }

    .object-fit-cover {
        display: none; /* Hide the image on smaller screens */
    }
}

/* Attendance Table Styling */
.attendance-table {
    text-align: center;
    vertical-align: middle;
    border-collapse: collapse; /* Ensure borders are collapsed for cleaner look */
    width: 100%; /* Make the table span the full width */
    border: 1px solid #dee2ec; /* Add a border around the table */
}

.attendance-table th, .attendance-table td {
    vertical-align: middle; /* Vertically center content */
    height: 50px; /* Set a consistent height for all cells */
    border: 1px solid #dee2ec; /* Add borders between rows and columns */
    padding: 8px; /* Add padding for better readability */
}

.attendance-table th {
    background-color: #1e427133; 
    font-weight: bold;
    height: fit-content;
}

.attendance-table .image-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px; /* Match the height of other cells */
}

.attendance-image {
    height: 35px; /* Set the image height to 35px */
    width: auto;
    cursor: pointer;
}

/* Button Styling */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-dark {
    background-color: #343a40;
    border-color: #343a40;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Attendance Location Page Styles */
.attendance-details-card {
    height: 250px; /* Allow the details card to adjust based on its content */
}

.attendance-image-card {
    height: 250px; /* Ensure the image card takes up the full height of its container */
}

.attendance-image-card .card-body {
    justify-content: center;
    align-items: center;
}

.attendance-image-card img {
    object-fit: contain;
}

.view-attendance-image-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.view-attendance-image {
    width: auto; /* Make the image responsive to the card's width */
    height: 170px; /* Maintain the aspect ratio of the image */
    object-fit: contain; /* Ensure the image fits within the card without distortion */
    border-radius: 8px; /* Rounded corners for consistency */
    background-color: #f8f9fa; /* Add a background color to fill empty space */
}

.view-attendance-map {
    height: 400px; /* Fixed height for the map */
    margin-bottom: 25px;
    border-radius: 8px; /* Rounded corners for the map */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
}