body {
    font-family: 'Inter', sans-serif;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

@media (min-width: 640px) {
    .calendar-grid {
        gap: 8px;
    }
}

.calendar-day {
    min-height: 60px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .calendar-day {
        aspect-ratio: 1;
        min-height: auto;
    }

        .calendar-day:hover:not(.empty) {
            transform: scale(1.05);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            z-index: 10;
        }
}

/* Full Card Shift Colors */
.bg-shift-AM {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.bg-shift-PM {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.bg-shift-ND {
    background-color: #f3e8ff;
    color: #6b21a8;
    border-color: #d8b4fe;
}

.bg-shift-All {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.shift-card {
    transition: all 0.2s;
}

.shift-radio[value="AM"]:checked + .shift-card {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.shift-radio[value="PM"]:checked + .shift-card {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.shift-radio[value="ND"]:checked + .shift-card {
    background-color: #7e22ce;
    border-color: #7e22ce;
    color: white;
}

.shift-radio[value="All Day"]:checked + .shift-card {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.shift-radio:checked + .shift-card .sub-text {
    color: rgba(255,255,255,0.8);
}

.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

/* TOAST STYLES */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 90%;
    max-width: 24rem;
}

@media (min-width: 640px) {
    #toast-container {
        width: auto;
    }
}

.toast {
    background: white;
    border-left: 4px solid;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    animation: slideInRight 0.3s ease-out forwards;
    opacity: 0;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOutToast {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-success {
    border-color: #10b981;
}

    .toast-success .icon {
        color: #10b981;
        background: #d1fae5;
    }

.toast-error {
    border-color: #ef4444;
}

    .toast-error .icon {
        color: #ef4444;
        background: #fee2e2;
    }

.toast-info {
    border-color: #3b82f6;
}

    .toast-info .icon {
        color: #3b82f6;
        background: #dbeafe;
    }

/* DATATABLES CUSTOM STYLING */
/* Hide default search box as we have a custom one */
.dataTables_filter {
    display: none;
}
/* Remove top border from DT */
table.dataTable.no-footer {
    border-bottom: none;
}

.dataTables_wrapper {
    width: 100%;
}

    /* --- IMPROVED ROWS DROPDOWN DESIGN --- */
    .dataTables_wrapper .dataTables_length {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        font-size: 0.875rem;
        color: #4b5563; /* text-gray-600 */
        font-weight: 500;
    }

        .dataTables_wrapper .dataTables_length label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .dataTables_wrapper .dataTables_length select {
            /* Reset default styles */
            appearance: none;
            background-color: #fff;
            /* Custom Dimensions */
            padding-top: 0.375rem; /* py-1.5 */
            padding-bottom: 0.375rem;
            padding-left: 0.75rem; /* pl-3 */
            padding-right: 2rem; /* pr-8 (space for icon) */
            /* Borders & Radius */
            border: 1px solid #d1d5db; /* border-gray-300 */
            border-radius: 0.5rem; /* rounded-lg */
            /* Typography */
            font-size: 0.875rem; /* text-sm */
            line-height: 1.25rem;
            color: #111827; /* text-gray-900 */
            font-weight: 500;
            /* Icon (Chevron Down) */
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
            background-position: right 0.5rem center;
            background-repeat: no-repeat;
            background-size: 1.25em 1.25em;
            /* Interaction */
            cursor: pointer;
            transition: all 0.2s ease-in-out;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
        }

            .dataTables_wrapper .dataTables_length select:hover {
                border-color: #9ca3af; /* border-gray-400 */
            }

            .dataTables_wrapper .dataTables_length select:focus {
                outline: none;
                border-color: #4f46e5; /* primary */
                box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); /* ring */
            }

    /* Pagination & Info Styling */
    .dataTables_wrapper .dataTables_paginate {
        display: flex;
        justify-content: flex-end;
        margin-top: 0;
        padding-right: 0;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .dataTables_wrapper .dataTables_info {
        padding-left: 0;
        margin-top: 0;
        font-size: 0.875rem;
        color: #6b7280;
    }

/* Mobile specific adjustments for DataTables controls */
@media (max-width: 640px) {
    .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .dataTables_wrapper .dataTables_info {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    /* Align the 'Rows per page' to left on mobile inside its flex container */
    .dataTables_wrapper .dataTables_length {
        justify-content: flex-start;
    }
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid #e5e7eb !important;
    background: white !important;
    color: #374151 !important;
    border-radius: 0.375rem;
    padding: 0.3rem 0.8rem;
    margin: 0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

    .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
        background: #f9fafb !important;
        border-color: #d1d5db !important;
        color: #111827 !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.current,
    .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
        background: #4f46e5 !important;
        color: white !important;
        border-color: #4f46e5 !important;
        font-weight: 500;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
    .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
        opacity: 0.5;
        cursor: not-allowed;
        background: white !important;
    }
