/* Keep the request dialog independent of the legacy page form styles. */
html.request-dialog-open,
html.request-dialog-open body { overflow: hidden; }

#window-form {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: 600px;
    max-width: calc(100% - 40px);
    height: fit-content;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    border: 1px solid #e7e7e9;
    border-radius: 16px;
    background: #fff;
    color: #202126;
    box-shadow: 0 24px 80px rgb(13 17 24 / 24%);
    font: 400 16px/1.5 Roboto, Arial, sans-serif;
}
#window-form[open] { display: flex; flex-direction: column; }
#window-form::backdrop {
    background: rgb(22 25 32 / 52%);
    backdrop-filter: blur(4px);
}
#window-form [hidden] { display: none !important; }
#window-form .window-form__header { position: relative; flex: none; padding: 40px 40px 0; }
#window-form .window-form__body { min-height: 0; padding: 30px 40px 40px; overflow: auto; overscroll-behavior: contain; }
#window-form .window-form__title {
    margin: 0 32px 0 0;
    padding: 0;
    color: #202126;
    font: 700 30px/1.2 Roboto, Arial, sans-serif;
    letter-spacing: -0.6px;
    outline: none;
}
#window-form .window-form__close {
    position: absolute;
    top: 20px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #74767c;
    cursor: pointer;
}
#window-form .window-form__close:hover { background: #f3f3f4; color: #202126; }
#window-form .window-form__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px 18px;
}
#window-form .window-form__field { min-width: 0; }
#window-form .window-form__field--wide { grid-column: 1 / -1; }
#window-form .window-form__field > label {
    display: block;
    margin: 0 0 8px;
    color: #45474e;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}
#window-form .window-form__required { margin-left: 4px; color: #c54f0b; }
#window-form .window-form__field input:not([type="hidden"]),
#window-form .window-form__field select,
#window-form .window-form__field textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid #d8d9dd;
    border-radius: 8px;
    outline: none;
    background: #fafafa;
    color: #202126;
    font: 400 16px/24px Roboto, Arial, sans-serif;
    box-shadow: none;
    transition: border-color 150ms, box-shadow 150ms, background-color 150ms;
}
#window-form .window-form__field textarea { height: 104px; min-height: 104px; resize: vertical; }
#window-form .window-form__field select {
    padding-right: 36px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e7077' stroke-width='1.7'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}
#window-form .window-form__field input:hover,
#window-form .window-form__field select:hover,
#window-form .window-form__field textarea:hover { border-color: #b8bac1; }
#window-form .window-form__field input:focus,
#window-form .window-form__field select:focus,
#window-form .window-form__field textarea:focus {
    border-color: #ed751e;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgb(243 111 33 / 14%);
}
#window-form .window-form__more {
    margin: 26px 0;
    border-top: 1px solid #ebebee;
    border-bottom: 1px solid #ebebee;
}
#window-form .window-form__more > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 6px 0;
    list-style: none;
    color: #45474e;
    font-size: 14px;
    cursor: pointer;
}
#window-form .window-form__more > summary::-webkit-details-marker { display: none; }
#window-form .window-form__more > summary:hover { color: #bd4c09; }
#window-form .window-form__more > summary svg { flex: none; }
#window-form .window-form__more[open] .window-form__more-vertical { display: none; }
#window-form .window-form__fields--extra { padding: 6px 0 24px; }
#window-form .window-form__submit {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fa7a18;
    color: #202126;
    font: 700 16px/22px Roboto, Arial, sans-serif;
    text-transform: none;
    cursor: pointer;
    transition: background-color 150ms;
}
#window-form .window-form__submit:hover { background: #ed6d0d; }
#window-form .window-form__submit:disabled { opacity: .65; cursor: wait; }
#window-form .window-form__close:focus-visible,
#window-form .window-form__submit:focus-visible,
#window-form summary:focus-visible,
#window-form a:focus-visible { outline: 2px solid #b4480b; outline-offset: 4px; }
#window-form .window-form__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 18px;
    color: #73757c;
    font-size: 12px;
    line-height: 18px;
}
#window-form .window-form__footer p { margin: 0; padding: 0; }
#window-form .window-form__note .window-form__required { margin-left: 0; }
#window-form .window-form__privacy a {
    color: #64666d;
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
#window-form .message-container-window:empty { display: none; }
#window-form .message-container-window:not(:empty),
#window-form .errors {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #e6c6be;
    border-radius: 8px;
    background: #fff6f3;
    color: #8c3324;
    font-size: 14px;
    line-height: 1.5;
}
#window-form .message-container-window.is-success {
    border-color: #ccddd2;
    background: #f2f8f4;
    color: #2c5740;
}
#window-form .message-container-window p,
#window-form .message-container-window .message,
#window-form .message-container-window .errors {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
}
@media (max-width: 600px) {
    #window-form {
        width: calc(100% - 24px);
        max-width: none;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 12px;
    }
    #window-form .window-form__header { padding: 30px 22px 0; }
    #window-form .window-form__body { padding: 26px 22px 24px; }
    #window-form .window-form__title { margin: 0 28px 0 0; font-size: 26px; letter-spacing: -0.4px; }
    #window-form .window-form__close { top: 12px; right: 10px; }
    #window-form .window-form__fields { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    #window-form .window-form__more { margin: 22px 0; }
}
@media (prefers-reduced-motion: reduce) {
    #window-form * { transition: none !important; }
}
