html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}



/* ============================================================ */
/* Loading overlay styling */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-container {
    text-align: center;
}


.loading-text {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #61398f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* ============================================================ */
/* New Loading overlay */
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}

/* ============================================================ */


/*.form-control {
    line-height: 2 !important;
}*/
.form-select {
    line-height: 2 !important;
}

table input {
    height: 35px !important;
}

    table input[type="checkbox"] {
        height: 15px !important;
        width: 15px !important;
    }




/* --------------------------------------------------- */

/* left and right for clear button */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 5px !important;
    right: auto !important;
}

/* Clear button next to arrow (but still on left side) */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    left: 30px !important; /* Next to arrow */
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    float: none !important;
}

/* Keep text on right */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 60px !important; /* Space for both buttons */
    text-align: right !important;
}


/* left and right for clear button */
html[dir="ltr"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 5px !important;
    left: auto !important;
}

/* Clear button next to arrow (but still on left side) */
html[dir="ltr"] .select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 30px !important; /* Next to arrow */
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    float: none !important;
}

/* Keep text on right */
html[dir="ltr"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 60px !important; /* Space for both buttons */
    text-align: left !important;
}

/* --------------------------------------------------- */


/* ---------------- Bills Custom Style ----------------------- */

.selected {
    background-color: #e0e0e0 !important;
}

body[data-layout-color=dark] .selected {
    background-color: #4a5260 !important;
    color: #fff !important;
}

td:hover {
    background-color: #e0e0e0;
}

body[data-layout-color=dark] td:hover {
    background-color: #4a5260 !important;
    color: #fff !important;
}

.group-box {
    width: 100px;
    height: 60px;
    border: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
}

    .group-box:hover {
        background-color: #e9ecef;
    }

body[data-layout-color=dark] .group-box {
    background-color: var(--ct-card-bg);
    color: var(--ct-table-color);
}

    body[data-layout-color=dark] .group-box:hover {
        background-color: #4a5260 !important;
        color: #fff !important;
    }


/* ---------------- Bills Custom Style ----------------------- */


html[dir="ltr"] input[type="email"],
html[dir="ltr"] input[type="password"],
html[dir="ltr"] input[type="tel"],
html[dir="ltr"] input[type="number"],
html[dir="ltr"] input[type="text"] {
    text-align: left !important;
    direction: ltr !important;
}

/*input[asp-for="EnName"],
input[name="EnName"],
input[asp-for="Item.EnName"] {
    text-align: left !important;
    direction: ltr !important;
}

input[asp-for="ArName"],
input[name="ArName"],
input[name="Item.ArName"] {
    text-align: right !important;
    direction: rtl !important;
}*/

html[dir="rtl"] input[name="EnName"],
html[dir="rtl"] input[name="Item.EnName"],
html[dir="rtl"] input[name="EnNationality"] {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] input[name="ArName"],
html[dir="ltr"] input[name="Item.ArName"],
html[dir="ltr"] input[name="ArNationality"] {
    text-align: right !important;
    direction: rtl !important;
}


/* Hide the default validation span */
span[data-valmsg-for] {
    display: none !important;
}

/* Show error icon inside input when invalid */
.input-validation-error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 36px !important;
    cursor: pointer;
    position: relative;
}

.val-tooltip {
    position: absolute;
    background: #dc3545;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

    .val-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        right: 10px;
        border: 5px solid transparent;
        border-top-color: #dc3545;
    }


/* Select2 invalid icon */
select.select2.is-invalid + .select2-container {
    position: relative;
}

    select.select2.is-invalid + .select2-container::after {
        content: "!";
        position: absolute;
        top: 50%;
        right: 25px;
        transform: translateY(-50%);
        width: 15px;
        height: 15px;
        border-radius: 50%;
        border: 2px solid #dc3545;
        color: #dc3545;
        font-size: 13px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }

[dir="rtl"] select.select2.is-invalid + .select2-container::after {
    right: auto;
    left: 25px;
}

[data-layout-color="dark"] .swal2-popup {
    background-color: var(--ct-card-bg);
    color:#fff;
}

