/* Activated only while a Shared form/panel is rendered. No dialog behavior is changed. */
body:has([data-sigpro-shared-messages]) {
    --sigpro-message-face: url('../images/assistant/sigpro-face-wink.png');
}

body:has([data-sigpro-shared-messages]) .swal2-icon.swal2-success,
body:has([data-sigpro-shared-messages]) .blazored-toast-success,
.sigpro-form-message.alert-success {
    --sigpro-message-face: url('../images/assistant/sigpro-face-smile.png');
}

body:has([data-sigpro-shared-messages]) .swal2-icon.swal2-error,
body:has([data-sigpro-shared-messages]) .blazored-toast-error,
.sigpro-form-message.alert-danger {
    --sigpro-message-face: url('../images/assistant/sigpro-face-error.png');
}

body:has([data-sigpro-shared-messages]) .swal2-icon {
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 0;
    background: var(--sigpro-message-face) center / contain no-repeat !important;
    animation: none !important;
}

/* Keep the library's visibility, loading state, focus and result handling intact. */
body:has([data-sigpro-shared-messages]) .swal2-icon > * {
    visibility: hidden !important;
}
body:has([data-sigpro-shared-messages]) .swal2-icon::before,
body:has([data-sigpro-shared-messages]) .swal2-icon::after {
    display: none !important;
}
body:has([data-sigpro-shared-messages]) .swal2-validation-message::before {
    content: '';
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 0;
    background: url('../images/assistant/sigpro-face-wink.png') center / contain no-repeat;
}

body:has([data-sigpro-shared-messages]) .blazored-toast:not(.blazored-toast-component)::before {
    content: '';
    display: block;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    margin-right: 12px;
    background: var(--sigpro-message-face) center / contain no-repeat;
    pointer-events: none;
}
body:has([data-sigpro-shared-messages]) .blazored-toast .blazored-toast-icon { display: none; }
body:has([data-sigpro-shared-messages]) .blazored-toast .blazored-toast-message { min-width: 0; }
body:has([data-sigpro-shared-messages]) .blazored-toast:not(.blazored-toast-component) {
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
}

.sigpro-form-message {
    --sigpro-message-face: url('../images/assistant/sigpro-face-wink.png');
}
.sigpro-form-message::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    margin: 0 12px 8px 0;
    background: var(--sigpro-message-face) center / contain no-repeat;
    pointer-events: none;
}

body:has([data-sigpro-shared-messages]) .validation-message:not(:empty)::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    vertical-align: middle;
    background: url('../images/assistant/sigpro-face-wink.png') center / contain no-repeat;
    pointer-events: none;
}

@media (max-width: 575.98px) {
    body:has([data-sigpro-shared-messages]) .swal2-icon { width: 80px; height: 80px; }
    body:has([data-sigpro-shared-messages]) .blazored-toast:not(.blazored-toast-component)::before {
        width: 40px; height: 40px; flex-basis: 40px; margin-right: 8px;
    }
}
