/* KPUM shared notifications and confirmation dialog */
.kpum-dialog-open {
    overflow: hidden;
}

.kpum-dialog-backdrop[hidden] {
    display: none !important;
}

.kpum-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(22, 14, 18, .58);
    backdrop-filter: blur(5px);
    animation: kpumBackdropIn .18s ease-out;
}

.kpum-dialog {
    width: min(100%, 510px);
    padding: 28px;
    border: 1px solid rgba(100, 22, 45, .10);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(28, 10, 17, .24);
    color: #30232a;
    animation: kpumDialogIn .22s cubic-bezier(.2, .8, .2, 1);
}

.kpum-dialog-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 17px;
    border-radius: 14px;
    background: #f6ecef;
    color: #64162d;
    font-size: 22px;
    font-weight: 800;
}

.kpum-dialog-copy h2 {
    margin: 0;
    color: #42101f;
    font-size: 20px;
    line-height: 1.35;
}

.kpum-dialog-copy p {
    margin: 10px 0 0;
    color: #71656a;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.kpum-dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.kpum-dialog-button {
    min-height: 43px;
    padding: 10px 19px;
    border: 0;
    border-radius: 11px;
    background: #f1edf0;
    color: #51434a;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.kpum-dialog-button:hover {
    transform: translateY(-1px);
    background: #e9e1e5;
}

.kpum-dialog-button:focus-visible,
.kpum-toast button:focus-visible {
    outline: 3px solid rgba(0, 125, 132, .35);
    outline-offset: 3px;
}

.kpum-dialog-accept {
    background: #007b80;
    color: #fff;
    box-shadow: 0 7px 18px rgba(0, 123, 128, .18);
}

.kpum-dialog-accept:hover {
    background: #00666b;
}

.kpum-dialog-accept.is-danger {
    background: #8f203d;
    box-shadow: 0 7px 18px rgba(143, 32, 61, .18);
}

.kpum-dialog-accept.is-danger:hover {
    background: #70172e;
}

.kpum-toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 21000;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100vw - 32px));
    pointer-events: none;
}

.kpum-toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 45px 15px 16px;
    border: 1px solid #eadde1;
    border-left: 4px solid #007b80;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(42, 20, 29, .16);
    color: #44343b;
    pointer-events: auto;
    animation: kpumToastIn .22s ease-out;
}

.kpum-toast-error {
    border-left-color: #b42345;
}

.kpum-toast-success {
    border-left-color: #237a5b;
}

.kpum-toast-message {
    flex: 1;
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.kpum-toast-action {
    flex-shrink: 0;
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    background: #64162d;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.kpum-toast-close {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 27px;
    height: 27px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #87777e;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.kpum-toast.is-leaving {
    opacity: 0;
    transform: translateY(7px);
    transition: opacity .22s ease, transform .22s ease;
}

@keyframes kpumBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes kpumDialogIn {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes kpumToastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .kpum-dialog {
        padding: 23px 20px 19px;
        border-radius: 18px;
    }

    .kpum-dialog-copy h2 {
        font-size: 18px;
    }

    .kpum-dialog-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .kpum-dialog-button {
        width: 100%;
        padding-inline: 10px;
    }

    .kpum-toast-container {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kpum-dialog-backdrop,
    .kpum-dialog,
    .kpum-toast {
        animation: none !important;
    }

    .kpum-dialog-button,
    .kpum-toast.is-leaving {
        transition: none !important;
    }
}
