#abihome-quote-trigger,
#abihome-quote-panel:not([open]) {
    display: none;
}

@media (min-width: 1024px) {
    #abihome-quote-trigger:not([hidden]) {
        display: block;
        position: fixed;
        z-index: 50;
        right: var(--m);
        bottom: 24px;
        max-width: min(440px, 85vw);
        min-height: 44px;
        border: 0;
        border-radius: 999px;
        padding: 12px 24px;
        background: transparent;
        color: white;
        font: inherit;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
    }

    #abihome-quote-trigger::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: #003776;
        box-shadow: 0 4px 14px rgb(0 28 60 / 22%);
    }

    #abihome-quote-trigger[inert] {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    #abihome-quote-trigger:hover::before { scale: 1.05; }
}

@media (prefers-reduced-motion: no-preference) {
    #abihome-quote-trigger:not([hidden]) {
        transition: opacity .6s cubic-bezier(.215, .61, .355, 1), translate .6s cubic-bezier(.215, .61, .355, 1), visibility .6s;
    }

    #abihome-quote-trigger::before {
        transition: scale .4s cubic-bezier(.215, .61, .355, 1);
    }

    @starting-style {
        #abihome-quote-trigger:not([hidden]) {
            opacity: 0;
            translate: 0 6px;
        }
    }

    #abihome-quote-trigger[inert] { translate: 0 6px; }

    #abihome-quote-trigger:focus-visible::before { scale: 1.05; }
}

#abihome-quote-panel[open] {
    position: fixed;
    inset: 0 0 0 auto;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: min(520px, 100vw);
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border: 0;
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
    background: white;
    color: #003776;
    font-family: "Space Grotesk", sans-serif;
    box-shadow: -12px 0 48px rgb(0 33 69 / 12%);
}

#abihome-quote-panel::backdrop {
    overflow: hidden;
    overscroll-behavior: contain;
    background: rgb(6 24 45 / 54%);
}

@media (prefers-reduced-motion: no-preference) {
    #abihome-quote-panel[open] {
        transform: translateX(0);
        transition: transform .4s cubic-bezier(.215, .61, .355, 1);
    }

    #abihome-quote-panel[open]::backdrop {
        opacity: 1;
        transition: opacity .3s ease-out;
    }

    @starting-style {
        #abihome-quote-panel[open] { transform: translateX(100%); }
        #abihome-quote-panel[open]::backdrop { opacity: 0; }
    }

    #abihome-quote-panel[data-closing] {
        transform: translateX(100%);
        transition-timing-function: cubic-bezier(.55, .055, .675, .19);
    }

    #abihome-quote-panel[data-closing]::backdrop { opacity: 0; }
}

#abihome-quote-panel header {
    display: flex;
    flex: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 32px;
    background: #d2e3fa;
}

#abihome-quote-title {
    margin: 0;
    align-self: center;
    font: 500 28px/1.15 "Space Grotesk", sans-serif;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

#abihome-quote-panel button {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    background: white;
    color: #003776;
    font: 400 30px/1 "Space Grotesk", sans-serif;
    cursor: pointer;
}

#abihome-quote-panel button:hover {
    background: #003776;
    color: white;
}

#abihome-quote-panel [role="alert"]:not([hidden]) {
    margin: 24px 32px;
    font-size: 16px;
    line-height: 1.5;
}

#abihome-quote-trigger:focus-visible,
#abihome-quote-panel button:focus-visible {
    outline: 3px solid #003776;
    outline-offset: 2px;
}

#abihome-quote-panel iframe {
    flex: 1;
    min-height: 0;
    width: 100%;
    border: 0;
}

#abihome-quote-panel iframe[data-loading] {
    visibility: hidden;
    opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
    #abihome-quote-panel iframe:not([data-loading]) {
        transition: opacity .2s ease-out;
    }
}
