/* =================================================
   GLOBAL MODAL STYLING SYSTEM
   Ensures consistent modal appearance across platform
   ================================================= */

/* =================================================
   Z-INDEX LAYERING (Bootstrap Modal Fix)

   CRITICAL: Bootstrap appends .modal-backdrop to <body> but
   .modal stays in the DOM where it was declared (often inside
   #main-content). If ANY ancestor creates a stacking context,
   the modal can't compete with the backdrop's z-index.

   FIX: Make the backdrop purely visual (pointer-events: none).
   Bootstrap's own JS handles click-outside-to-dismiss via the
   .modal element, NOT the backdrop. So the backdrop only needs
   to LOOK like an overlay, not capture clicks.
   ================================================= */

/* Backdrop is VISUAL ONLY — never captures clicks */
.modal-backdrop {
    z-index: var(--z-modal-backdrop) !important;
    pointer-events: none !important;
}

.modal-backdrop.show,
.modal-backdrop.fade {
    z-index: var(--z-modal-backdrop) !important;
    pointer-events: none !important;
}

/* Modal wrapper — must capture clicks for dismiss-on-outside-click */
.modal {
    z-index: var(--z-modal-window) !important;
}

.modal.show {
    z-index: var(--z-modal-window) !important;
    pointer-events: auto !important;
}

/* Dialog container — Bootstrap sets pointer-events:none so clicks
   on the grey area around the dialog pass to .modal for dismissal */
.modal-dialog {
    z-index: var(--z-modal-dialog) !important;
    position: relative;
}

.modal.show .modal-dialog {
    z-index: var(--z-modal-dialog) !important;
}

/* Modal content — the actual white card that MUST be clickable */
.modal-content {
    position: relative;
    z-index: var(--z-content);
    pointer-events: auto !important;
}

/* =================================================
   GLOBAL MODAL STYLING - Applied to ALL modals
   ================================================= */

/* Modal Dialog - Always centered and scrollable */
.modal-dialog {
    margin: 1.75rem auto;
}

.modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
    display: flex;
    align-items: center;
}

.modal-dialog-scrollable {
    max-height: calc(100% - 3.5rem);
}

.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 3.5rem);
    overflow: hidden;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

/* Modal Content - Rounded corners and shadow */
.modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* Modal Header - Purple gradient matching brand */
.modal .modal-header {
    background: var(--modal-header-bg);
    color: white !important;
    border: none;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
}

.modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

/* Ensure all text in modal headers is white */
.modal .modal-header,
.modal .modal-header *,
.modal .modal-header h1,
.modal .modal-header h2,
.modal .modal-header h3,
.modal .modal-header h4,
.modal .modal-header h5,
.modal .modal-header h6,
.modal .modal-header .modal-title {
    color: white !important;
}

.modal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white !important;
    margin: 0;
    position: relative;
    z-index: var(--z-content); /* Above header ::before overlay */
}

/* Close button - White on purple header */
.modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    position: relative;
    z-index: var(--z-content); /* Above header ::before overlay */
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.modal .modal-header .btn-close:hover {
    opacity: 1;
}

/* Modal Body */
.modal .modal-body {
    padding: 1.5rem;
    background: var(--modal-body-bg);
}

/* Slim scrollbar for Bootstrap modals */
.modal .modal-dialog {
    scrollbar-width: thin;
    scrollbar-color: var(--modal-scrollbar-thumb-legacy) transparent;
}

.modal .modal-dialog::-webkit-scrollbar {
    width: 6px;
}

.modal .modal-dialog::-webkit-scrollbar-track {
    background: transparent;
}

.modal .modal-dialog::-webkit-scrollbar-thumb {
    background: var(--modal-scrollbar-thumb-legacy);
    border-radius: 3px;
}

.modal .modal-dialog::-webkit-scrollbar-thumb:hover {
    background: var(--modal-scrollbar-thumb-legacy-hover);
}

/* Modal Footer */
.modal .modal-footer {
    padding: 1rem 1.5rem;
    background: var(--modal-footer-bg);
    border-top: 1px solid var(--modal-border);
    border-radius: 0 0 16px 16px;
    gap: 0.75rem;
}

/* =================================================
   FORM STYLING INSIDE MODALS
   ================================================= */

.modal .form-label {
    font-weight: 600;
    color: var(--modal-label-text);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.modal .form-control,
.modal .form-select {
    border: 2px solid var(--modal-input-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal .form-control:focus,
.modal .form-select:focus {
    border-color: var(--modal-input-focus-border);
    box-shadow: var(--modal-input-focus-ring);
    outline: none;
}

.modal .form-control::placeholder {
    color: var(--modal-input-placeholder);
}

.modal textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Form help text */
.modal .form-text {
    font-size: 0.8125rem;
    color: var(--modal-btn-outline-text);
    margin-top: 0.25rem;
}

/* =================================================
   BUTTON STYLING INSIDE MODALS
   ================================================= */

.modal .btn-primary {
    background: var(--modal-header-bg);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.modal .btn-primary:hover {
    background: var(--modal-header-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.modal .btn-primary:active {
    transform: translateY(0);
}

.modal .btn-secondary {
    background: var(--modal-btn-secondary-bg);
    border: 2px solid var(--modal-btn-secondary-border);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--modal-btn-secondary-text);
    transition: all 0.2s ease;
}

.modal .btn-secondary:hover {
    background: var(--modal-btn-secondary-hover-bg);
    border-color: var(--modal-btn-secondary-hover-border);
    color: var(--modal-btn-secondary-hover-text);
}

.modal .btn-danger {
    background: var(--modal-danger-btn-bg);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.modal .btn-danger:hover {
    background: var(--modal-danger-btn-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal .btn-outline-secondary {
    border: 2px solid var(--modal-input-border);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: var(--modal-btn-outline-text);
    background: transparent;
    transition: all 0.2s ease;
}

.modal .btn-outline-secondary:hover {
    background: var(--modal-btn-outline-hover-bg);
    border-color: var(--modal-btn-outline-hover-border);
    color: var(--modal-btn-outline-hover-text);
}

/* =================================================
   MODAL SIZE VARIANTS
   ================================================= */

.modal-sm .modal-content {
    max-width: 400px;
}

.modal-lg .modal-content {
    max-width: 800px;
}

.modal-xl .modal-content {
    max-width: 1140px;
}

/* =================================================
   CUSTOM MODALS (without Bootstrap's .modal-dialog)
   Use .custom-modal class for better browser support
   ================================================= */

.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal-custom);
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.custom-modal.show {
    display: flex !important;
}

.custom-modal .modal-content {
    background: var(--modal-bg);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: auto;
    position: relative;
    z-index: var(--z-content);
}

.custom-modal .modal-header {
    background: var(--modal-header-bg);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.custom-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.custom-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    position: relative;
    z-index: var(--z-content); /* Above header ::before overlay */
}

.custom-modal .modal-header .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    z-index: var(--z-content); /* Above header ::before overlay */
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal .modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.custom-modal .modal-body {
    padding: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--modal-scrollbar-thumb-legacy) transparent;
}

.custom-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.custom-modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.custom-modal .modal-body::-webkit-scrollbar-thumb {
    background: var(--modal-scrollbar-thumb-legacy);
    border-radius: 3px;
}

.custom-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--modal-scrollbar-thumb-legacy-hover);
}

/* Custom scrollbar for modals */
.custom-modal .modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--modal-scrollbar-thumb-legacy) transparent;
}

.custom-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}

.custom-modal .modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0 16px 16px 0;
}

.custom-modal .modal-content::-webkit-scrollbar-thumb {
    background: var(--modal-scrollbar-thumb-legacy);
    border-radius: 3px;
}

.custom-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--modal-scrollbar-thumb-legacy-hover);
}

/* Also style Bootstrap modals */
.modal-dialog-scrollable .modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--modal-scrollbar-thumb-legacy) transparent;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: var(--modal-scrollbar-thumb-legacy);
    border-radius: 3px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--modal-scrollbar-thumb-legacy-hover);
}

.custom-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--modal-footer-bg);
    border-top: 1px solid var(--modal-border);
    border-radius: 0 0 16px 16px;
}

/* Form Grid for Custom Modals */
.custom-modal .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.custom-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-modal .form-group.span-2 {
    grid-column: span 2;
}

.custom-modal .form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--modal-label-text);
}

.custom-modal .form-control,
.custom-modal .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--modal-input-border);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--modal-input-bg);
}

.custom-modal .form-control:focus,
.custom-modal .form-select:focus {
    outline: none;
    border-color: var(--modal-focus-border);
    box-shadow: var(--modal-focus-ring);
}

.custom-modal .form-control::placeholder {
    color: var(--modal-input-placeholder);
}

.custom-modal textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.custom-modal .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-modal .form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--modal-checkbox-accent);
}

.custom-modal .form-check-label {
    font-size: 0.875rem;
    color: var(--modal-label-text);
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .custom-modal {
        padding: 0.5rem;
    }

    .custom-modal .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .custom-modal .modal-header {
        padding: 1rem;
        border-radius: 12px 12px 0 0;
    }

    .custom-modal .modal-header h2 {
        font-size: 1.125rem;
    }

    .custom-modal .modal-body {
        padding: 1rem;
    }

    .custom-modal .form-grid {
        grid-template-columns: 1fr;
    }

    .custom-modal .form-group.span-2 {
        grid-column: span 1;
    }

    .custom-modal .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column-reverse;
    }

    .custom-modal .modal-footer .btn {
        width: 100%;
    }

    /* Hide scrollbar on mobile - use touch scroll instead */
    .custom-modal .modal-content,
    .custom-modal .modal-body,
    .modal .modal-dialog,
    .modal .modal-body,
    .modal:not(:has(.modal-dialog)) .modal-content,
    .modal:not(:has(.modal-dialog)) .modal-body {
        scrollbar-width: none;
    }

    .custom-modal .modal-content::-webkit-scrollbar,
    .custom-modal .modal-body::-webkit-scrollbar,
    .modal .modal-dialog::-webkit-scrollbar,
    .modal .modal-body::-webkit-scrollbar,
    .modal:not(:has(.modal-dialog)) .modal-content::-webkit-scrollbar,
    .modal:not(:has(.modal-dialog)) .modal-body::-webkit-scrollbar {
        display: none;
    }
}

/* Legacy support - keep old selectors for backward compatibility */
.modal:not(:has(.modal-dialog)) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal-custom);
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal:not(:has(.modal-dialog)):not(.show) {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.modal:not(:has(.modal-dialog)).show {
    display: flex !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.modal:not(:has(.modal-dialog)):not(.show) * {
    pointer-events: none !important;
}

.modal:not(:has(.modal-dialog)) .modal-content {
    background: var(--modal-bg);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: auto;
    position: relative;
    z-index: var(--z-content);
    scrollbar-width: thin;
    scrollbar-color: var(--modal-scrollbar-thumb-legacy) transparent;
}

.modal:not(:has(.modal-dialog)) .modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal:not(:has(.modal-dialog)) .modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal:not(:has(.modal-dialog)) .modal-content::-webkit-scrollbar-thumb {
    background: var(--modal-scrollbar-thumb-legacy);
    border-radius: 3px;
}

.modal:not(:has(.modal-dialog)) .modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--modal-scrollbar-thumb-legacy-hover);
}

.modal:not(:has(.modal-dialog)) .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--modal-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal:not(:has(.modal-dialog)) .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--modal-legacy-header-text);
}

.modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    color: var(--modal-close-text);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--modal-close-hover-bg);
    color: var(--modal-close-hover-text);
}

.modal:not(:has(.modal-dialog)) .modal-body {
    padding: 1.5rem;
}

/* =================================================
   ORPHANED BACKDROP FIX
   ================================================= */

body > .modal-backdrop:not(.show) {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

body.modal-open {
    overflow: hidden;
}

/* =================================================
   MOBILE RESPONSIVE MODALS
   ================================================= */

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-dialog-centered {
        min-height: calc(100% - 1rem);
    }

    .modal .modal-header {
        padding: 1rem;
    }

    .modal .modal-body {
        padding: 1rem;
    }

    .modal .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
    }

    .modal .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    .modal .modal-footer .btn + .btn {
        margin-top: 0.5rem;
    }

    .modal .modal-title {
        font-size: 1.125rem;
    }

    .modal .form-control,
    .modal .form-select {
        padding: 0.625rem 0.875rem;
    }
}

/* Tablet */
@media (min-width: 577px) and (max-width: 768px) {
    .modal-dialog {
        margin: 1rem auto;
        max-width: calc(100% - 2rem);
    }

    .modal-lg .modal-dialog,
    .modal-xl .modal-dialog {
        max-width: calc(100% - 2rem);
    }
}

/* =================================================
   ANIMATION ENHANCEMENTS
   ================================================= */

.modal.fade .modal-dialog {
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.2s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .modal.fade .modal-dialog {
        transform: none;
        transition: none;
    }
}

/* =================================================
   CONFIRMATION/DELETE MODAL VARIANT
   ================================================= */

.modal-confirm .modal-header {
    background: var(--modal-confirm-header-bg);
}

.modal-confirm .modal-body {
    text-align: center;
    padding: 2rem 1.5rem;
}

.modal-confirm .modal-body .confirm-icon {
    width: 64px;
    height: 64px;
    background: var(--modal-confirm-icon-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal-confirm .modal-body .confirm-icon svg {
    color: var(--modal-confirm-icon-text);
    width: 32px;
    height: 32px;
}

.modal-confirm .modal-footer {
    justify-content: center;
}

/* =================================================
   SUCCESS MODAL VARIANT
   ================================================= */

.modal-success .modal-header {
    background: var(--modal-success-header-bg);
}

.modal-success .modal-body .success-icon {
    width: 64px;
    height: 64px;
    background: var(--modal-success-icon-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal-success .modal-body .success-icon svg {
    color: var(--modal-success-icon-text);
    width: 32px;
    height: 32px;
}

/* =================================================
   MODAL INTERACTIVITY SAFETY NET
   Guarantees modals are always clickable regardless
   of where they sit in the DOM or what stacking
   contexts exist above them.
   ================================================= */

/* ANY shown modal, anywhere in the DOM, must be interactive */
.modal.show {
    pointer-events: auto !important;
}

.modal.show .modal-dialog {
    pointer-events: none !important; /* Bootstrap default: pass clicks to .modal */
}

.modal.show .modal-content {
    pointer-events: auto !important; /* Content MUST be clickable */
}

.modal.show .modal-content * {
    pointer-events: auto; /* All children of content inherit clickability */
}

/* Hidden modals must NEVER intercept clicks */
.modal:not(.show) {
    pointer-events: none !important;
}

.modal[aria-hidden="true"] {
    pointer-events: none !important;
}

/* Backdrop must NEVER intercept clicks — it's purely visual */
.modal-backdrop {
    pointer-events: none !important;
}

/* =================================================
   MODAL SCROLLBAR STYLING
   Slim, branded scrollbar on desktop; hidden on mobile (touch scroll)
   ================================================= */

/* Desktop: slim purple scrollbar */
.modal .modal-body,
.modal .modal-content,
.modal .modal-dialog,
.custom-modal .modal-body,
.custom-modal .modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--modal-scrollbar-thumb) transparent;
}

.modal .modal-body::-webkit-scrollbar,
.modal .modal-content::-webkit-scrollbar,
.modal .modal-dialog::-webkit-scrollbar,
.custom-modal .modal-body::-webkit-scrollbar,
.custom-modal .modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal .modal-body::-webkit-scrollbar-track,
.modal .modal-content::-webkit-scrollbar-track,
.modal .modal-dialog::-webkit-scrollbar-track,
.custom-modal .modal-body::-webkit-scrollbar-track,
.custom-modal .modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal .modal-body::-webkit-scrollbar-thumb,
.modal .modal-content::-webkit-scrollbar-thumb,
.modal .modal-dialog::-webkit-scrollbar-thumb,
.custom-modal .modal-body::-webkit-scrollbar-thumb,
.custom-modal .modal-content::-webkit-scrollbar-thumb {
    background: var(--modal-scrollbar-thumb);
    border-radius: 3px;
}

.modal .modal-body::-webkit-scrollbar-thumb:hover,
.modal .modal-content::-webkit-scrollbar-thumb:hover,
.modal .modal-dialog::-webkit-scrollbar-thumb:hover,
.custom-modal .modal-body::-webkit-scrollbar-thumb:hover,
.custom-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--modal-scrollbar-thumb-hover);
}

/* Mobile: hide scrollbar entirely, rely on touch scroll */
@media (max-width: 768px) {
    .modal .modal-body,
    .modal .modal-content,
    .modal .modal-dialog,
    .custom-modal .modal-body,
    .custom-modal .modal-content {
        scrollbar-width: none !important;
    }

    .modal .modal-body::-webkit-scrollbar,
    .modal .modal-content::-webkit-scrollbar,
    .modal .modal-dialog::-webkit-scrollbar,
    .custom-modal .modal-body::-webkit-scrollbar,
    .custom-modal .modal-content::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }
}
