﻿.speedbump-dialog {
    width: min(32rem, calc(100% - 2rem));
    max-width: none;
    margin: auto;
    padding: 0;
    overflow: visible;
    color: var(--color-charcoal);
    background: transparent;
    border: 0;
}

    .speedbump-dialog::backdrop {
        background-color: rgb(18 24 32 / 72%);
        backdrop-filter: blur(2px);
    }

.speedbump-dialog__panel {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 2rem;
    background-color: #fff;
    border-top: 0.375rem solid var(--color-gold);
    border-radius: 0.5rem;
    box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 24%), 0 0.25rem 0.75rem rgb(0 0 0 / 12%);
}

.speedbump-dialog__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    color: var(--color-gold);
    background-color: var(--color-cream);
    border-radius: 50%;
}

    .speedbump-dialog__icon svg {
        width: 1.75rem;
        height: 1.75rem;
        fill: currentColor;
    }

.speedbump-dialog__body {
    min-width: 0;
    padding-right: 1.5rem;
}

.speedbump-dialog__title {
    margin: 0 0 0.75rem;
    color: #2f323a;
    font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
}

.speedbump-dialog__message {
    margin: 0;
    color: #50545d;
    font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

.speedbump-dialog__actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dfe2e7;
}

.speedbump-dialog__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: #50545d;
    font: inherit;
    font-size: 1.75rem;
    line-height: 1;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

    .speedbump-dialog__close:hover {
        color: #1f2228;
        background-color: #f1f2f4;
    }

    .speedbump-dialog__close:focus-visible,
    .speedbump-dialog__actions .btn:focus-visible {
        outline: 0.1875rem solid #1f6feb;
        outline-offset: 0.1875rem;
    }

.speedbump-dialog__external-icon {
    display: inline-flex;
    margin-left: 0.375rem;
    vertical-align: middle;
}

    .speedbump-dialog__external-icon svg {
        width: 1rem;
        height: 1rem;
        fill: currentColor;
    }

.speedbump-dialog[open] {
    animation: speedbump-dialog-enter 160ms ease-out;
}

html:has(.speedbump-dialog[open]) {
    overflow: hidden;
}

@keyframes speedbump-dialog-enter {
    from {
        opacity: 0;
        transform: translateY(0.75rem) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 35.999rem) {
    .speedbump-dialog {
        width: calc(100% - 1rem);
    }

    .speedbump-dialog__panel {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.5rem;
    }

    .speedbump-dialog__icon {
        width: 2.75rem;
        height: 2.75rem;
    }

    .speedbump-dialog__body {
        padding-right: 0;
    }

    .speedbump-dialog__actions {
        flex-direction: column-reverse;
    }

        .speedbump-dialog__actions .btn {
            width: 100%;
        }
}

@media (prefers-reduced-motion: reduce) {
    .speedbump-dialog[open] {
        animation: none;
    }
}

@media (forced-colors: active) {
    .speedbump-dialog__panel {
        border: 0.125rem solid CanvasText;
    }

    .speedbump-dialog__icon {
        color: CanvasText;
        background-color: Canvas;
        border: 0.125rem solid CanvasText;
    }
}
