/* ==========================================================================
   GLOBAL BADGE STYLES FOR TABLES (ALL PAGES)
   ========================================================================== */

/* Target all badges inside tables to ensure a consistent, premium, compact, and readable aesthetic */
#dt-basic-example tbody td .badge,
#dt-roles tbody td .badge,
#dt-correos tbody td .badge,
#dt-pagos-cert tbody td .badge,
table tbody td .badge,
.table tbody td .badge,
.dataTable tbody td .badge,
table tbody td *[class*="badge"],
table .badge,
.table .badge,
.dataTable .badge {
    /* 1. Size & Typography (Elegant, compact and highly readable) */
    font-size: 0.68rem !important; /* Sleek and refined size, slightly smaller than cell text for perfect proportion */
    font-weight: 600 !important; /* Premium bold weight to keep compact letters crisp and highly legible */
    letter-spacing: 0.03em !important; /* Elegant spacing between uppercase letters */
    text-transform: uppercase !important;
    line-height: 1.2 !important;

    /* 2. Text Color (Strictly white in both light and dark modes - completely overrides ID specificity traps) */
    color: #ffffff !important;

    /* 3. Uniform Dimensions */
    display: inline-block !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    text-align: center !important;

    /* 4. Spacing, Shape & Depth */
    padding: 0.35em 0.5em !important;
    border-radius: 4px !important;
    border: none !important; /* Removes default borders from outline badges inside tables */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important; /* Subtle shadow for premium depth */
    
    /* 5. Modern Interactive Transitions */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Ensure outline badges inside tables get a solid background and white text */
table .badge-outline-primary,
.table .badge-outline-primary,
.dataTable .badge-outline-primary {
    background-color: #886ab5 !important; /* Solid theme purple (primary) */
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Ensure warning badges have excellent readability and contrast for white text on light/dark mode */
table .badge.bg-warning,
.table .badge.bg-warning,
.dataTable .badge.bg-warning {
    background-color: #e67e22 !important; /* Rich amber/orange for strong contrast and premium look */
}

/* Elegant micro-animation on hover to feel responsive and alive */
table .badge:hover,
.table .badge:hover,
.dataTable .badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.18) !important;
    filter: brightness(1.08);
}

/* ==========================================================================
   SELECT2 DROPDOWN PREMIUM STYLES (OPAQUE & COMPATIBLE WITH LIGHT/DARK MODES)
   ========================================================================== */

/* Light Mode: Enforce solid opaque white backgrounds for select2 dropdown container and options */
.select2-container--open .select2-dropdown,
.select2-dropdown,
.select2-search--dropdown,
.select2-results,
.select2-results__options,
.select2-results__option {
    background-color: #ffffff !important;
    color: #333333 !important;
    opacity: 1 !important;
}

/* Specific styling for the input search box inside select2 dropdown in Light Mode */
.select2-search--dropdown .select2-search__field {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid rgba(127, 127, 127, 0.3) !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #886ab5 !important; /* System purple */
    color: #ffffff !important;
}

.select2-results__option[aria-selected=true] {
    background-color: rgba(136, 106, 181, 0.12) !important;
    color: #886ab5 !important;
}

/* Dark Mode: Enforce solid opaque dark grey backgrounds for select2 dropdown container and options */
.theme-dark .select2-container--open .select2-dropdown,
.theme-dark .select2-dropdown,
.theme-dark .select2-search--dropdown,
.theme-dark .select2-results,
.theme-dark .select2-results__options,
.theme-dark .select2-results__option {
    background-color: #2b303b !important;
    color: #dee2e6 !important;
    opacity: 1 !important;
}

/* Specific styling for the input search box inside select2 dropdown in Dark Mode */
.theme-dark .select2-search--dropdown .select2-search__field {
    background-color: #212529 !important;
    color: #dee2e6 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.theme-dark .select2-results__option--highlighted[aria-selected] {
    background-color: #886ab5 !important; /* System purple */
    color: #ffffff !important;
}

.theme-dark .select2-results__option[aria-selected=true] {
    background-color: rgba(136, 106, 181, 0.2) !important;
    color: #9d81c9 !important;
}

