/* Common CSS */
:root {
    --background-color: #3a506b;
    /* --background-color: #ccd5ae; */
    --text-color: #343a40;
    --sec-color: #ccd5ae;
    --third-color: #d4a373;
    --green: #ccd5ae;
    --global-font: "Poppins", sans-serif;
    --default-fs: 15px;
    --transition-speed: 0.3s;
}

/* Scroll */
html::-webkit-scrollbar {
    width: 8px;
    background-color: var(--third-color);
}

html::-webkit-scrollbar-thumb {
    background: var(--third-color);
    border-radius: 10px;
}

/* Global CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: var(--global-font);
    font-size: var(--default-fs);
    text-decoration: none;
    list-style-type: none;
}

body {
    font-family: var(--global-font);
    overflow-y: auto;
}

ul {
    list-style: none;
}

nav {
    width: 100%;
    color: #fff !important;
    position: sticky;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    height: 100%;
    background: var(--background-color);
    position: fixed;
    /* top: 30; */
    left: -250px;
    transition: left var(--transition-speed) ease-in-out;
    overflow-x: hidden;
    z-index: 9999;
}

.sidebar.active {
    left: 0;
    box-shadow: 3px 3px 5px 3px rgba(0, 0, 0, 0.3);
}

#toggle-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu-item {
    padding: 10px 20px;
    border-bottom: 2px solid #fff;
    cursor: pointer;
    transition: var(--transition-speed) ease-in-out;
}

.sidebar-menu-item:hover {
    background-color: #dfdf34;
}

.sidebar-menu-item a,
#side-icon {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

#side-icon {
    margin-right: 30px;
}


/* Main Content */
.main-content {
    margin-left: 0;
    padding: 20px;
    transition: margin-left var(--transition-speed);
}

/* When sidebar opens, push content */
.sidebar.active+.main-content {
    margin-left: 250px;
}

/* Content Style */
.content {
    margin-top: 68px;
    margin-left: 0;
    transition: all 0.3s ease-in-out;
    padding: 10px 30px;
    min-height: 93vh;
}

.content.active {
    margin-left: 250px;
}

/* Push the footer to the bottom */
.sidebar-footer {
    margin-top: auto;
    padding: 0 20px;
    background-color: var(--background-color);
}

.menu-btn {
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
    padding: 5px;
}

.menu-btn:hover {
    color: var(--hover-color);
}

/* login  */
.login-container {
    height: 100vh;
    width: 100%;
}

.login-card {
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 2px 2px 3px 3px #1e1e1e57;
}

/* .login-card h1 {
    font-size: 30px;
    font-weight: 700;
} */

.login-input {
    padding: 5px 0px;
}

.btn-cargo {
    background-color: var(--background-color);
    color: #fff;
    font-size: 20px;
}

/* Card */
.card {
    color: var(--text-color);
    border-radius: 10px;
    transition: 0.3s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px #8d8d8d26, 0 3px 6px #0000001a;
}

/* Datatable CSS */
mark {
    background: yellow;
    padding: 0px;
}

.paginate_button {
    background-color: rgba(128, 128, 128, 0.101);
    border-radius: 4px;
    cursor: pointer;
}

.paginate_button.previous,
.paginate_button.next {
    background: none;
}

#customerTable_info {
    text-align: center;
    color: #ccc;
    margin-bottom: 0.5rem;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    line-height: 1.08em;
}

.paginate_button.current {
    background-color: var(--sec-theme-color);
    color: #fff;
}

#datatable_filter input {
    padding: 5px 10px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    outline: none;
    background-color: var(--background-color);
    color: #000 !important;
}

#datatable_filter input:focus {
    outline: 2px solid var(--sec-theme-color) !important;
}

#datatable_filter input:active {
    outline: 2px solid var(--sec-theme-color) !important;
}

#datatable_length select {
    padding: 5px 25px 5px 10px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    outline: none;
    background-color: var(--background-color);
    color: #000 !important;
    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 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.card-body {
    padding: 2rem;
}

.page-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-add-customer:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.table {
    margin-top: 1rem;
    vertical-align: middle;
}

.table thead th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid #dee2e6;
}

.table tbody td {
    padding: 1rem;
    font-size: 15px;
    vertical-align: middle;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-edit,
.btn-delete,
.btn-detail {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-detail {
    background-color: #379cd2;
    border: none;
    color: #fff;
    cursor: pointer;
}

.btn-edit {
    background-color: #4CAF50;
    border: none;
    color: #fff;
    cursor: pointer;
}

.btn-delete {
    background-color: #ff4444;
    border: none;
    color: #fff;
    cursor: pointer;
}

i {
    font-size: 17px;
}

.btn-edit:hover,
.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #4243545b 0%, #4243547f 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: linear-gradient(135deg, #4243548a 0%, #42435474 100%) !important;
    color: white !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_filter input {
    background-color: #f0f8ff !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px 10px;
    margin-left: 10px;
}

.dataTables_wrapper .dataTables_length select {
    background-color: #f0f8ff !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px 10px;
}

.dataTable tbody td {
    font-size: 15px;
    padding: 10px;
}

.dataTable thead th {
    font-size: 15px;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.badge {
    padding: 0.5em 1em;
    border-radius: 6px;
    font-weight: 500;
}

/* Loading spinner style */
.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
}

.dataTables_filter {
    margin-bottom: 15px;
}

.help-block.error-help-block {
    color: red;
    font-size: 13px;
    font-weight: normal;
    margin-top: 4px;
}

input.is-invalid,
textarea.is-invalid {
    border-color: red !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 0, 0, 0.25);
}

#loader {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(103, 103, 103, 0.3);
    z-index: 9999;
}

#loader dotlottie-player {
    backdrop-filter: blur(5px);
    width: 70px;
    height: 70px;
    background-color: #eff0edec;
    border-radius: 30px;
    box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.2);
}

.language-switcher-sidebar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.language-switcher-sidebar .language-btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    background: white;
}

.language-switcher-sidebar .language-btn:hover {
    background: #f8f9fa;
    color: #0d6efd;
    border-color: #0d6efd;
}

.language-switcher-sidebar .language-btn.active {
    background: var(--sec-color);
    color: white;
    border-color: #0d6efd;
}

.language-switcher-sidebar .language-btn i {
    margin-right: 10px;
}

.custom-image-select,
.custom-image-select-edit {
    position: relative;
    width: 100%;
    max-width: 100%;
    font-family: 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    margin-bottom: 15px;
}

.select-header,
.select-header-edit {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 44px;
}

.select-header:hover,
.select-header-edit:hover {
    border-color: #b3b3b3;
}

.select-options,
.select-options-edit {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 30vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px #0000001a;
    width: 100%;
}

.option,
.option-edit {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 44px;
    border-bottom: 2px solid #0000001a;
}

.option-text,
.option-text-edit,
.option-text span,
.option-text-edit span {
    font-size: 16px;
    color: #2d2b2bc3;
}

.option-text span,
.option-text-edit span {
    background-color: #dee129d5;
    padding: 8px;
    border-radius: 5px;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 3px;
}

.option:hover,
.option-edit:hover {
    background-color: #999595b1;
}

.option.selected,
.option-edit.selected-edit {
    background-color: #6d6e1892;
    color: white;
}

.option-image,
.option-image-edit {
    width: 30px;
    height: 20px;
    margin-right: 12px;
    border-radius: 3px;
    border: 1px solid black;
    flex-shrink: 0;
}

.selected-option,
.selected-option-edit {
    display: flex;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
}

#select-arrow,
#select-arrow-edit {
    color: #6d6e18;
    transition: transform 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.custom-image-select.active #select-arrow,
.custom-image-select-edit.active #select-arrow-edit {
    transform: rotate(180deg);
}

.custom-image-select.active .select-options,
.custom-image-select-edit.active .select-options-edit {
    display: block;
}

.modal-body {
    height: 80vh;
    overflow-y: auto;
}

.modal-content {
    max-height: 90vh;
}

/* Responsive adjustments for tablets */
@media (max-width: 992px) {

    .option-text span,
    .option-text-edit span {
        font-size: 14px;
        padding: 6px;
        font-size: 14px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {

    .select-header,
    .option,
    .option-edit,
    .select-header-edit {
        padding: 14px 15px;
    }

    .option-text,
    .option-text span,
    .option-text-edit,
    .option-text-edit span {
        font-size: 15px;
    }

    .select-options,
    .select-options-edit {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        border-radius: 12px 12px 0 0;
        margin-top: 0;
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .custom-image-select.active::after,
    .custom-image-select-edit.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .option,
    .option-edit {
        flex-wrap: wrap;
    }

    .option-text span,
    .option-text-edit span {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {

    .option-image,
    .option-image-edit {
        width: 35px;
        height: 25px;
    }

    .option-text span,
    .option-text-edit span {
        font-size: 13px;
        padding: 5px;
    }

    .select-header,
    .select-header-edit {
        padding: 12px;
    }
}

/* Responsive: Sidebar collapses on smaller screens */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        left: -250px;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar.active+.main-content {
        margin-left: 0;
    }

    .dataTables_filter {
        float: none !important;
        text-align: left !important;
        margin-bottom: 15px;
    }

    .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .dataTables_length {
        float: none !important;
        margin-bottom: 15px;
    }

    .dataTables_info {
        float: none !important;
        text-align: center !important;
        margin-bottom: 15px;
    }

    .dataTables_paginate {
        float: none !important;
        text-align: center !important;
        margin-top: 15px;
    }
}

.nav-item button,
.nav-item i {
    font-size: 16px;
}

@media (max-width: 576px) {
    #navbar-content {
        padding: 0 !important;
    }

    #theme-toggle {
        padding: 0px 20px;
    }

    .nav-item {
        margin: 0px 5px;
    }

    .nav-item button,
    .nav-item i {
        font-size: 14px;
    }
}