/* Custom Scrollbar for Modal Body */
.modal-body-scrollable {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.modal-body-scrollable::-webkit-scrollbar {
    width: 10px;
}

.modal-body-scrollable::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.modal-body-scrollable::-webkit-scrollbar-thumb {
    background: #14B8A6;
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

.modal-body-scrollable::-webkit-scrollbar-thumb:hover {
    background: #0D9488;
}

/* Firefox scrollbar */
.modal-body-scrollable {
    scrollbar-width: thin;
    scrollbar-color: #14B8A6 #f1f5f9;
}

/* index page toggle switch */
/* General Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 40px;
    margin: 0 auto;
}

.toggle-switch input {
    display: none;
}

.toggle-label {
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    height: 100%;
    width: 100%;
    transition: background-color 0.3s;
}

.toggle-label:before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label .toggle-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-weight: bold;
    color: #ffffff;
    top: 10px;
    transition: opacity 0.3s;
}

/* State Change: When Checked (Sign In) */
.toggle-switch input:checked+.toggle-label {
    background-color: #dc3545;
    /* Red for "Sign In" */
}

.toggle-switch input:checked+.toggle-label:before {
    transform: translateX(40px);
}

.toggle-switch input:checked+.toggle-label .toggle-text {
    color: #ffffff;
}

/* State Change: When Unchecked (Sign Out) */
.toggle-switch input:not(:checked)+.toggle-label {
    background-color: #28a745;
    /* Green for "Sign Out" */
}

.toggle-switch input:not(:checked)+.toggle-label .toggle-text {
    color: #ffffff;
}

.attendance-records-container {
    max-height: 500px;
    /* Adjust the height as needed */
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* Webkit Scrollbar Styling (Chrome, Safari, Edge) */
.attendance-records-container::-webkit-scrollbar {
    width: 10px;
}

.attendance-records-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.attendance-records-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #14B8A6 0%, #0D9488 100%);
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

.attendance-records-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
}

/* Firefox Scrollbar */
.attendance-records-container {
    scrollbar-width: thin;
    scrollbar-color: #14B8A6 #f1f5f9;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.number-item {
    padding: 10px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.number-item:hover {
    opacity: 0.8;
}

/* Universal Modal Styling - Fixed Size and Custom Scrollbar */
.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

@media (min-width: 576px) {
    .modal-dialog {
        min-height: calc(100% - 3.5rem);
    }
}

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    /* Fixed height feel */
    display: flex;
    flex-direction: column;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    background-color: #fff;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    color: #1a202c;
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-body {
    max-height: 65vh !important;
    /* Fixed body height */
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 1.5rem !important;
    flex: 1 1 auto;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
    background-color: #fff;
    border-radius: 0 0 12px 12px;
}

/* Custom Scrollbar for ALL Modal Bodies */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #14B8A6 0%, #0D9488 100%);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
}

/* Firefox Scrollbar */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: #14B8A6 #f8fafc;
}

/* Ensure modal looks fixed on all pages */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}