﻿body {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .mobile-menu {
        display: none;
    }

        .mobile-menu.active {
            display: block;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background-color: #0f172a;
            padding: 1rem;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }

            .mobile-menu.active li {
                display: block;
                margin: 0.5rem 0;
            }
}

/* Dark mode styles */
.swal-dark-popup {
    background-color: #1d232a;
    color: white;
    border-radius: 0.75rem;
}

.swal-dark-confirm {
    background-color: #c084fc;
    color: black;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    margin-right: 10px;
}

.swal-dark-cancel {
    background-color: #191e24;
    color: white;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 4px;
}


.swal-dark-cancel, .swal-dark-confirm:focus-visible {
    outline: none;
}


/* using in add-update user modal */
.select2-container {
    width: 100%;
}

.select2-results__options {
    max-height: 250px !important; /* approx 10 items */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.select2-container--default .select2-selection--multiple {
    min-height: fit-content;
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    overflow-y: auto;
}



.select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem;
}

.select2-selection__choice {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.select2-selection__rendered::-webkit-scrollbar {
    height: 6px;
}


/* === Table Layout === */
.datatable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #0f172a; /* Dark table background */
    color: #cbd5e1; /* Light text */
}

    .datatable th {
        background-color: hsl(var(--b2));
        color: hsl(var(--bc));
        font-weight: 600;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .datatable td {
        padding: 0.75rem 1rem;
    }

    .datatable tr {
        border-bottom: 1px solid hsl(var(--b3));
    }

        .datatable tr:hover {
            background-color: #1e293b; /* Slight hover effect */
        }

    /* Zebra striping */
    .datatable tbody tr:nth-child(even) {
        background-color: #1a2332;
    }


/* === Length Selector === */
.dataTables_wrapper .dataTables_length {
    padding: 12px 10px;
    float: left;
    background-color: white;
    color: black;
}

    .dataTables_wrapper .dataTables_length select {
        background-color: #1c2431;
        color: #cbd5e1;
        border: 1px solid #334155;
        border-radius: 0.375rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.875rem;
    }

/* === Info Text === */
.dataTables_wrapper .dataTables_info {
    color: #94a3b8;
    font-size: 0.875rem;
    padding: 12px 10px;
    float: left;
}

/* === Empty Table Message === */
.dataTables_wrapper .dataTables_empty {
    color: #f87171; /* Red-400 */
    text-align: center;
    font-weight: 500;
    padding: 1rem;
}


/*.dt-paging {
    padding: 12px 10px;
    float: right;
}

*/
/* Pagination container */
.dt-paging {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 12px 10px !important;
    justify-content: flex-end !important;
}

/* Base button styles */
.dt-paging-button {
    background-color: #1c2431 !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.375rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

    /* Hover */
    .dt-paging-button:hover:not(.disabled):not(.current) {
        background-color: #273548 !important;
        border-color: #7c3aed !important;
        color: #ffffff !important;
    }

    /* Current (active) page */
    .dt-paging-button.current {
        background-color: #7c3aed !important;
        border-color: #7c3aed !important;
        color: #ffffff !important;
        font-weight: 600 !important;
    }

    /* Disabled state */
    .dt-paging-button.disabled {
        background-color: #1c2431 !important;
        border-color: #334155 !important;
        color: #64748b !important;
        cursor: not-allowed !important;
        opacity: 0.6 !important;
    }

    /* Optional: transition effect */
    .dt-paging-button,
    .dt-paging-button:hover,
    .dt-paging-button.current {
        transition: background-color 0.3s, border-color 0.3s, color 0.3s !important;
    }




.dt-info {
    padding: 12px 10px;
    float: left;
}

.dt-length {
    padding: 12px 10px;
}



    /* Fix dropdown (select) in .dt-length */
    .dt-length select,
    .dataTables_wrapper .dataTables_length select {
        background-color: #1c2431 !important;
        color: #cbd5e1 !important;
        border: 1px solid #334155 !important;
        border-radius: 0.375rem;
        padding: 0.35rem 0.75rem;
        font-size: 0.875rem;
        appearance: none;
    }

    /* Optional: style label next to select */
    .dt-length label,
    .dataTables_wrapper .dataTables_length label {
        color: #cbd5e1;
        font-size: 0.875rem;
        margin-left: 0.5rem;
    }

    /* Optional: caret icon for consistent appearance across browsers */
    .dt-length select::-ms-expand {
        display: none;
    }
