/* SYS toast close-button visibility (SweetAlert2 toast mode)
 *
 * SweetAlert2 defaults that cause invisible/clipped × on white toasts:
 * - color: #ccc (low contrast)
 * - overflow: hidden on .swal2-close
 * - margin-bottom: -1.2em (can clip under toast overflow-y:hidden)
 * - tiny .8em / 1.2em box competing with large font-size
 */
.sys-toast-container {
    pointer-events: none;
}

.sys-toast-container .swal2-popup {
    pointer-events: auto;
}

.swal2-popup.swal2-toast.sys-toast-notification {
    padding-right: 0.5rem !important;
    overflow: visible !important;
    align-items: start !important;
}

.swal2-popup.swal2-toast.sys-toast-notification .swal2-title {
    padding-right: 0.25rem;
    text-align: left;
}

.swal2-popup.swal2-toast.sys-toast-notification .swal2-html-container,
.swal2-popup.swal2-toast.sys-toast-notification .swal2-html-container:not(:empty) {
    text-align: left;
    padding-right: 0.25rem;
}

button.swal2-close.sys-toast-close,
.sys-toast-notification button.swal2-close,
.sys-toast-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #374151 !important; /* dark gray — visible on white toast */
    background: transparent !important;
    border: 0 !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    min-width: 2.75rem !important;
    min-height: 2.75rem !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    overflow: visible !important;
    position: relative !important;
    inset: auto !important;
    z-index: 5 !important;
    cursor: pointer !important;
    align-self: start !important;
    justify-self: end !important;
    box-shadow: none !important;
}

button.swal2-close.sys-toast-close:hover,
.sys-toast-notification button.swal2-close:hover,
.sys-toast-close:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
}

button.swal2-close.sys-toast-close:focus-visible,
.sys-toast-notification button.swal2-close:focus-visible {
    outline: 2px solid #166534 !important;
    outline-offset: 2px !important;
}

@media (max-width: 640px) {
    button.swal2-close.sys-toast-close,
    .sys-toast-notification button.swal2-close,
    .sys-toast-close {
        width: 2.75rem !important;
        height: 2.75rem !important;
        min-width: 2.75rem !important;
        min-height: 2.75rem !important;
        font-size: 1.85rem !important;
    }

    body.swal2-toast-shown .swal2-container.swal2-top-end,
    body.swal2-toast-shown .swal2-container.swal2-top-right {
        right: 8px !important;
        left: auto !important;
        max-width: calc(100vw - 16px) !important;
    }
}
