.dataTables_length label .form-select{
    padding-right: 25px !important;
}

/* Fix for subscription pages layout */
.page-wrapper {
    overflow-x: auto;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure tables in subscription pages are properly sized */
.table {
    min-width: 100%;
}

/* Fix modal and dropdown positioning */
.dropdown-menu {
    z-index: 1050;
}

/* Fix sidebar scroll for all pages */
.sidebar .sidebar-inner {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar .sidebar-inner.slimscroll {
    max-height: calc(100vh - 100px);
}

/* Fix slimscroll rail visibility */
.slimScrollBar {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

.slimScrollRail {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* ================================================================ */
/* CRITICAL FIX: Bootstrap 5 Modal Opacity Issue                   */
/* ================================================================ */

/* Fix modal backdrop only when shown */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
}

.modal-backdrop.show {
    opacity: 0.5 !important;
    visibility: visible !important;
    display: block !important;
}

/* Ensure all modals are properly hidden by default */
.modal {
    z-index: 1060 !important;
}

/* Show modal when it has show class */
.modal.show {
    z-index: 1060 !important;
    display: block !important;
}

/* Modal structure visibility */
.modal.show .modal-dialog {
    z-index: 1061 !important;
}

.modal.show .modal-content {
    z-index: 1062 !important;
    opacity: 1 !important;
    visibility: visible !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.175) !important;
}

/* Headers, bodies, and footers */
.modal.show .modal-header,
.modal.show .modal-body,
.modal.show .modal-footer {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Labels and text content */
.modal.show label,
.modal.show .form-label,
.modal.show p,
.modal.show span,
.modal.show h1,
.modal.show h2,
.modal.show h3,
.modal.show h4,
.modal.show h5,
.modal.show h6 {
    opacity: 1 !important;
    visibility: visible !important;
    color: currentColor !important;
    pointer-events: auto !important;
}

/* ALL input types must be interactive */
.modal.show input[type="text"],
.modal.show input[type="email"],
.modal.show input[type="password"],
.modal.show input[type="number"],
.modal.show input[type="tel"],
.modal.show input[type="date"],
.modal.show input[type="time"],
.modal.show input[type="checkbox"],
.modal.show input[type="radio"],
.modal.show input:not([type]),
.modal.show textarea,
.modal.show select,
.modal.show .form-control,
.modal.show .form-select,
.modal.show .form-check-input,
.modal.show button,
.modal.show .btn,
.modal.show a.btn,
.modal.show input.btn {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    color: currentColor !important;
    background-color: white !important;
    cursor: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
}

/* Focus and active states*/
.modal.show input:focus,
.modal.show textarea:focus,
.modal.show select:focus,
.modal.show .form-control:focus,
.modal.show .form-select:focus {
    opacity: 1 !important;
    outline: none !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.modal.show button:hover,
.modal.show .btn:hover,
.modal.show a.btn:hover {
    opacity: 1 !important;
    cursor: pointer !important;
}

/* Remove any overlay that might block content */
.modal.show::before,
.modal.show::after,
.modal.show .modal-content::before,
.modal.show .modal-content::after,
.modal.show .modal-dialog::before,
.modal.show .modal-dialog::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Force body not to be hidden when modal is open */
body.modal-open {
    overflow: hidden !important;
}

