.modal-custom-extension .modal-dialog {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    margin: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    width: var(--falcon-modal-width);
    max-width: none; 
}
 

.modal-custom-extension.show .modal-dialog {
    transform: translateX(0);
}

.modal-custom-extension .modal-content {
    height: 100%;
    border-radius: 0;
    border: none;
    overflow-y: auto;
}

@media (max-width: 767.98px) {
    .modal-custom-extension .modal-dialog {
        position: fixed;
        inset: 0;
        width: 100% !important;
        height: 100%;
        max-width: 100%;
        transform: none;
        transition: none;
    }

    .modal-custom-extension .modal-content {
        height: 100%;
        border-radius: 0;
    }
}

/* Desktop arrow */
.modal-custom-extension .modal-header .close::before {
    content: "\f060"; /* fa-arrow-left */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 22px;
}

/* Mobile close icon */
@media (max-width: 767.98px) {
    .modal-custom-extension .modal-header .close::before {
        content: "\f00d"; /* fa-times */
        font-size: 20px;
    }
}
/* ===============================
   Loading Overlay (Dark/Light Safe)
   =============================== */
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--falcon-body-bg);
    opacity: 0.5;
    border-radius: 0.375rem; /* matches .rounded */
    z-index: 10;
}

/* ===============================
   Falcon theme for Tom Select
   =============================== */

/* Wrapper */
.ts-wrapper {
    width: 100%;
    position: relative;
}

/* Control (matches .form-select-sm) */
.ts-control {
    display: flex;
    align-items: center;
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 2rem 0.25rem 0.5rem !important; /* space for caret */
    font-size: 0.875rem;
    line-height: 1.5;
    color: #344050;
    background-color: #fff;
    border: 1px solid var(--falcon-border-color, #d8e2ef);
    border-radius: 0.375rem;
    box-shadow: none;
    cursor: pointer;
}

    /* Input inside control */
    .ts-control input {
        padding: 0;
        margin: 0;
        font-size: inherit;
        line-height: inherit;
        color: inherit;
    }

    /* Dropdown caret (native-style) */
    .ts-control::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 0.75rem;
        width: 0.45rem;
        height: 0.45rem;
        border-right: 2px solid #6c757d;
        border-bottom: 2px solid #6c757d;
        transform: translateY(-60%) rotate(45deg);
        pointer-events: none;
    }

/* Focus (Falcon style) */
.ts-wrapper.focus .ts-control {
    border-color: var(--falcon-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.25);
}

/* Disabled */
.ts-wrapper.disabled .ts-control {
    background-color: #edf2f9;
    cursor: not-allowed;
}

/* Dropdown */
.ts-dropdown {
    border: 1px solid var(--falcon-border-color, #d8e2ef);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    z-index: 1055; /* Falcon modal safe */
}


    /* Options */
    .ts-dropdown .option {
        padding: 0.375rem 0.75rem;
        cursor: pointer;
    }

        /* Active / Hover */
        .ts-dropdown .option.active,
        .ts-dropdown .option:hover {
            background-color: rgba(44, 123, 229, 0.08);
            color: var(--falcon-primary);
        }
/* ===============================
   Dark mode support (Falcon)
   =============================== */
[data-bs-theme="dark"] .ts-wrapper.full .ts-control {
    background-color: #0b1727 !important;
}


[data-bs-theme="dark"] .ts-control {
    background-color: #0b1727; /* Falcon dark input bg */
    color: #d8e2ef; /* Falcon body text */
    border-color: #2c3e50;
}

    /* Caret color */
    [data-bs-theme="dark"] .ts-control::after {
        border-color: #9da9bb;
    }

    /* Placeholder / input text */
    [data-bs-theme="dark"] .ts-control input {
        color: #d8e2ef;
    }

/* Focus */
[data-bs-theme="dark"] .ts-wrapper.focus .ts-control {
    border-color: var(--falcon-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.35);
}

/* Dropdown */
[data-bs-theme="dark"] .ts-dropdown {
    background-color: #0b1727;
    color: #d8e2ef;
    border-color: #2c3e50;
}

    /* Options */
    [data-bs-theme="dark"] .ts-dropdown .option {
        color: #d8e2ef;
    }

        [data-bs-theme="dark"] .ts-dropdown .option.active,
        [data-bs-theme="dark"] .ts-dropdown .option:hover {
            background-color: rgba(44, 123, 229, 0.2);
            color: #fff;
        }

/* TomSelect invalid state */
.ts-control.is-invalid {
    border-color: #dc3545;
}

    .ts-control.is-invalid:focus-within {
        box-shadow: 0 0 0 0.2rem rgba(220,53,69,.25);
    }
.ts-wrapper.is-invalid .ts-control {
    border-color: #dc3545;
}
