/**
 * Floating / inquiry modals — mobile bottom sheet, max one viewport height.
 */
body.service-modal-open {
    overflow: hidden;
}

.service-modal-panel {
    max-height: min(92dvh, 100%);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}

@media (min-width: 640px) {
    .service-modal-panel {
        max-height: min(88vh, 40rem);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    }
}

.service-modal-panel__handle {
    display: block;
    width: 2.5rem;
    height: 0.25rem;
    margin: 0 auto 0.625rem;
    border-radius: 9999px;
    background-color: #d1d5db;
}

.service-modal-panel__body {
    -webkit-overflow-scrolling: touch;
}

/* Compact floating message form */
.message-form--compact .message-form__fields {
    gap: 0.625rem;
}

.message-form--compact .message-form__label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.message-form--compact .message-form__field {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.875rem;
}

.message-form--compact .message-form__grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.message-form--compact .message-form__textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.message-form--compact .message-form__captcha-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.message-form--compact .message-form__captcha-row .message-form__field {
    width: 100%;
    flex: none;
    min-width: 0;
}

.message-form--compact .message-form__captcha-actions {
    flex-shrink: 0;
    width: auto;
    align-self: flex-start;
}

.message-form--compact .message-form__captcha-actions img {
    height: 2.25rem;
    width: 5.5rem;
}

.message-form--compact .message-form__submit-wrap {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, #ffffff 75%, rgba(255, 255, 255, 0));
}

.message-form--compact .message-form__submit {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 0.9375rem;
}

@media (max-width: 639px) {
    #service-modal {
        padding: 0;
    }

    #inquiry-modal {
        align-items: flex-end;
        padding: 0;
    }

    #inquiry-modal > .bg-white,
    #inquiry-modal .site-modal-panel {
        width: 100%;
        max-width: 100%;
        max-height: min(92dvh, 100%);
        margin: 0;
        border-radius: 1rem 1rem 0 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
