.dsn-quote-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: flex-end;
    visibility: hidden;
}

.dsn-quote-modal[hidden] {
    display: none;
}

.dsn-quote-modal.is-open {
    visibility: visible;
}

.dsn-quote-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 60%);
    cursor: default;
    opacity: 0;
    transition: opacity 300ms ease;
}

.dsn-quote-modal.is-open .dsn-quote-modal__backdrop {
    opacity: 1;
}

.dsn-quote-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 42rem);
    height: 100%;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-color: #6b7280 #e5e7eb;
    scrollbar-width: thin;
    background: #fff;
    color: #111827;
    box-shadow: -12px 0 40px rgb(0 0 0 / 20%);
    transform: translateX(100%);
    transition: transform 300ms ease;
}

.dsn-quote-modal__panel::-webkit-scrollbar {
    width: 0.625rem;
}

.dsn-quote-modal__panel::-webkit-scrollbar-track {
    background: #e5e7eb;
}

.dsn-quote-modal__panel::-webkit-scrollbar-thumb {
    border: 2px solid #e5e7eb;
    border-radius: 9999px;
    background: #6b7280;
}

.dsn-quote-modal__panel::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.dsn-quote-modal.is-open .dsn-quote-modal__panel {
    transform: translateX(0);
}

.dsn-quote-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 9999px;
    background: rgb(255 255 255 / 92%);
    color: #111827;
    font: inherit;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 12px rgb(0 0 0 / 15%);
}

.dsn-quote-modal__close:hover,
.dsn-quote-modal__close:focus-visible {
    background: #0078a8;
    color: #fff;
}

.dsn-quote-modal__media {
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #e5e7eb;
}

.dsn-quote-modal__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dsn-quote-modal__content {
    padding: clamp(1.5rem, 5vw, 3rem);
}

.dsn-quote-modal__title {
    margin: 0 0 0.75rem;
    color: #005f9c;
    font-family: Montserrat, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
}

.dsn-quote-modal__description,
.dsn-quote-modal__context {
    margin-bottom: 1.5rem;
}

.dsn-quote-modal__description > :first-child {
    margin-top: 0;
}

.dsn-quote-modal__context {
    padding: 0.75rem 1rem;
    border-left: 4px solid #0078a8;
    background: #f0f9ff;
}

.dsn-quote-modal__form {
    margin-top: 1.5rem;
}

.dsn-quote-modal__form .nf-form-fields-required {
    margin-bottom: 1.25rem;
    color: #4b5563;
    font-size: 0.875rem;
}

.dsn-quote-modal__form .nf-field-container {
    margin-bottom: 1.25rem;
}

.dsn-quote-modal__form .nf-field-label {
    margin-bottom: 0.4rem;
}

.dsn-quote-modal__form .nf-field-label label,
.dsn-quote-modal__form label {
    color: #1f2937;
    font-weight: 600;
}

.dsn-quote-modal__form input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.dsn-quote-modal__form select,
.dsn-quote-modal__form textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    color: #111827;
    font: inherit;
    line-height: 1.5;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dsn-quote-modal__form textarea {
    min-height: 8rem;
    resize: vertical;
}

.dsn-quote-modal__form input:not([type="hidden"]):not([type="submit"]):not([type="button"]):focus,
.dsn-quote-modal__form select:focus,
.dsn-quote-modal__form textarea:focus {
    border-color: #0078a8;
    outline: 0;
    box-shadow: 0 0 0 3px rgb(0 120 168 / 15%);
}

.dsn-quote-modal__form input[type="checkbox"],
.dsn-quote-modal__form input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.4rem;
    accent-color: #0078a8;
}

.dsn-quote-modal__form input[type="submit"],
.dsn-quote-modal__form button[type="submit"] {
    min-height: 3rem;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: 0.375rem;
    background: #005d99;
    color: #fff;
    font: inherit;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.dsn-quote-modal__form input[type="submit"]:hover,
.dsn-quote-modal__form button[type="submit"]:hover {
    background: #004b7a;
}

.dsn-quote-modal__form input[type="submit"]:focus-visible,
.dsn-quote-modal__form button[type="submit"]:focus-visible {
    outline: 3px solid rgb(0 120 168 / 25%);
    outline-offset: 2px;
}

.dsn-quote-modal__form .nf-error .ninja-forms-field {
    border-color: #b91c1c;
}

.dsn-quote-modal__form .nf-error-msg,
.dsn-quote-modal__form .ninja-forms-req-symbol {
    color: #b91c1c;
}

.dsn-quote-modal__form .nf-error-msg {
    margin-top: 0.35rem;
    font-size: 0.875rem;
}

.dsn-quote-modal__form .nf-response-msg {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border-left: 4px solid #0078a8;
    background: #f0f9ff;
}

body.has-open-quote-modal {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .dsn-quote-modal__backdrop,
    .dsn-quote-modal__panel {
        transition: none;
    }
}
