﻿/* ==========================================================
   COMMON UTILITIES
========================================================== */

.bg-primary {
    background-color: var(--primary) !important;
}

.no-scroll {
    scrollbar-width: none !important;
}

    .no-scroll::-webkit-scrollbar {
        display: none;
    }

.no-width {
    width: auto !important;
}

.required::after {
    content: "*";
    color: red;
    margin-left: 5px;
    font-size: 1em;
    font-weight: 600;
}

.font-bold {
    font-weight: 600 !important;
}

.font-14 {
    font-size: 14px !important;
}

.font-20 {
    font-size: 20px !important;
}

.br-bottom-20 {
    border-bottom-left-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
}

/* ==========================================================
   BUTTONS
========================================================== */

.btn-primary {
    padding: 8px 18px;
    border-radius: 6px;
}

.btn-light {
    border-radius: 6px;
}

.btn-warning {
    border-radius: 6px;
}

.btn-outline-white {
    background-color: white;
    color: #1a1a1a;
    border: 1px solid #d0d0d0;
}

    .btn-outline-white:hover,
    .btn-check:checked + .btn-outline-white {
        background-color: #f0f0f0;
        border-color: #007bff;
        color: #007bff;
        font-weight: 600;
    }

/* ==========================================================
   SUGGESTION LIST
========================================================== */

.suggestion-list-box {
    position: absolute;
    z-index: 1000;
    background-color: white;
    border-radius: 0.25rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-height: 150px;
    overflow-y: auto;
    min-width: 100%;
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

    .suggestion-list-box .list-group-item {
        padding-left: .5rem;
        padding-right: .5rem;
        color: black;
        cursor: pointer;
        padding: .25rem .5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border: none;
        margin: 0;
    }

        .suggestion-list-box .list-group-item:hover {
            background-color: whitesmoke;
            color: #111;
        }

/* ==========================================================
   CONFIRM BOX
========================================================== */

.confirm-box {
    top: 50px;
    max-width: 450px;
    min-height: 250px;
    padding: 15px;
    border-radius: .25rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

    .confirm-box h5 {
        text-align: center;
        font-weight: 600;
        font-size: 1.3rem;
    }

    .confirm-box .message {
        color: #000dff;
        font-weight: 400;
        font-size: 1rem;
        text-align: center;
    }

    .confirm-box .question {
        color: #808080;
        font-weight: 400;
        font-size: 1rem;
        text-align: center;
    }

/* ==========================================================
   CARDS
========================================================== */

.card {
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0px 4px 20px rgba(0,0,0,0.07);
}

    .card .card-header {
        border-radius: 14px 14px 0 0;
        font-weight: 600;
        background: rgb(248 250 252);
    }

    .card .card-body {
        scrollbar-width: thin;
    }

        .card .card-body::-webkit-scrollbar {
            width: 6px;
        }

        .card .card-body::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }

/* ==========================================================
   MODERN CARD
========================================================== */

.modern-card {
    border-radius: 14px;
    background: #fff;
}

.modern-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

    .modern-card-header .header-left h6 {
        font-size: 15px;
    }

    .modern-card-header .header-right {
        display: flex;
        align-items: center;
    }

/* ==========================================================
   EMPTY / LOADING / ERROR STATES
========================================================== */

.data-list-empty-td {
    background: #f8fafc;
    text-align: center;
    color: #6b7280;
    font-weight: 500;
    padding: 30px 10px;
    border-left: none !important;
}

    .data-list-empty-td i {
        font-size: 26px;
        color: #9ca3af;
        display: block;
        margin-bottom: 6px;
    }

    .data-list-empty-td span {
        font-size: 14px;
    }

.data-list-loading-td {
    background: #f9fafb;
    text-align: center;
    color: #2563eb;
    font-weight: 500;
    padding: 28px 10px;
}

    .data-list-loading-td .spinner-border {
        width: 1.6rem;
        height: 1.6rem;
        margin-bottom: 6px;
    }

    .data-list-loading-td span {
        display: block;
        font-size: 14px;
    }

/* ==========================================================
   MODALS
========================================================== */

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.modal-header {
    background: #b3c2d1;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    font-weight: 600;
    color: #1e293b;
}

.modal-body {
    padding: 16px;    
}

.modal-fullscreen .modal-content {
    height: 100vh;
}

.modal-fullscreen .modal-body {
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

/* ==========================================================
   MODERN MODAL
========================================================== */

.modern-modal {
    border-radius: 16px;
}

    .modern-modal .modal-header {
        padding: 16px 20px;
        background: #b3c2d1;
        border-radius: 16px 16px 0 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .modern-modal .modal-body {
        padding: 16px;
        max-height: calc(100vh - 107px);
        overflow-y: auto;
    }

    .modern-modal .modal-footer {
        background: #f1f8ff;
        border-top: 1px solid #e2e8f0;
        padding: 0 20px;
    }

/* ==========================================================
   ACCORDION
========================================================== */

.modern-accordion .accordion-button {
    background: #f8f9fa;
    border-radius: .75rem;
}

    .modern-accordion .accordion-button:not(.collapsed) {
        background: #e7f1ff;
        color: #0d6efd;
        box-shadow: none;
    }

.modern-accordion .accordion-body {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px !important;
}

.modern-accordion.accordion-item {
    border: none;
}

.modern-accordion .form-label.small {
    font-size: .75rem;
    margin-bottom: 2px;
}

/* ==========================================================
   FLOATING CARD
========================================================== */

.floating-card-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.floating-card {
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
}

/* ==========================================================
   IMAGE PREVIEW
========================================================== */

img#img_company_logo,
img#img_company_qr {
    border-radius: 10px;
    object-fit: contain;
}

/* ==========================================================
   SEARCH COMPONENTS
========================================================== */

.search-box-modern {
    position: relative;
    width: 200px;
}

    .search-box-modern .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
    }

    .search-box-modern .search-input {
        padding-left: 38px;
        padding-right: 10px;
        border-radius: 6px;
    }

.search-input {
    padding-left: 35px;
    border-radius: 6px;
    height: 36px;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 13px;
}

/* ==========================================================
   SCROLL CONTAINER
========================================================== */

.scroll-container {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: none;
}

    .scroll-container::-webkit-scrollbar {
        display: none;
    }

/* ==========================================================
   UTILITIES
========================================================== */

.u-text-center {
    text-align: center !important;
}

.u-text-right {
    text-align: right !important;
}

.u-fw-500 {
    font-weight: 500 !important;
}

.u-fw-600 {
    font-weight: 600 !important;
}

.u-fs-12 {
    font-size: 12px !important;
}

.u-fs-14 {
    font-size: 14px !important;
}

.u-fs-20 {
    font-size: 20px !important;
}

.u-mt-1 {
    margin-top: .25rem !important;
}

.u-mt-2 {
    margin-top: .5rem !important;
}

.u-mt-3 {
    margin-top: 1rem !important;
}
