.modals {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.modals.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

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

.modal-contents {
    width: min(100%, 560px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
    transform: translateY(18px);
    transition: transform .2s ease;
}

.modals.is-open .modal-contents {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 10px 12px 10px 20px;
    background: #ff8201;
    color: #fff;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.closes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
}

.closes svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.closes:hover,
.closes:focus-visible {
    background: #fff;
    color: #b95800;
}

.modal-body {
    padding: 22px 20px;
}

.modal-body form {
    display: grid;
    gap: 12px;
}

.modal-body label {
    color: #404040;
    font-size: 15px;
    font-weight: 700;
}

#correo_cliente {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #707574;
    border-radius: 5px;
    font: inherit;
}

#boton_modal {
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 5px;
    background: #ff8201;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

#boton_modal:hover,
#boton_modal:focus-visible {
    background: #b95800;
}

.modal-footer {
    padding: 16px 20px max(30px, env(safe-area-inset-bottom, 0px));
    background: #f7f7f7;
    color: #404040;
}

.modal-footer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.closes:focus-visible,
#correo_cliente:focus-visible,
#boton_modal:focus-visible {
    outline: 2px solid #8a4300;
    outline-offset: 3px;
}

@media only screen and (max-width: 767px) {
    .modals {
        align-items: flex-end;
        padding: 12px 12px 0;
    }

    .modal-contents {
        width: 100%;
        max-height: calc(100dvh - 24px);
        border-radius: 12px 12px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modals,
    .modal-contents {
        transition: none;
    }
}
