.tg-service-form {
    position: relative;
    width: 100%;
    margin: 32px 0;
    overflow: hidden;
    border: 1px solid #dfe7ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(22, 49, 74, .1);
    color: #23384b;
}

.tg-service-form__header {
    padding: 22px 24px 12px;
    background: linear-gradient(135deg, #f6faff 0%, #fff 72%);
}

.tg-service-form__header--compact {
    display: flex;
    justify-content: flex-end;
    padding: 10px 16px;
    background: #fff;
}

.tg-service-form__header--compact .tg-service-form__external {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.service-landing-form-section .tg-service-form--landing {
    margin: 0;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    text-align: left;
}

/* Lift the whole landing stacking context above the sticky site header while
   a child form is in focus mode. The section normally clips its background. */
body.tg-service-form-focus-active .service-landing-form-section {
    z-index: 50010;
    overflow: visible;
}

body.tg-service-form-focus-active .service-landing-form-section .content-form {
    z-index: 50011;
}

.service-landing-form-section .tg-service-form__frame {
    box-shadow: none;
}

.article-page-content .tg-service-form__eyebrow,
.article-page-content .tg-service-form__description,
.article-page-content .tg-service-form__external {
    margin: 0;
}

.article-page-content .tg-service-form__eyebrow {
    color: #d87300;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.article-page-content .tg-service-form__title {
    margin: 5px 0 6px;
    color: #173a59;
    font-size: 25px;
    line-height: 1.25;
}

.article-page-content .tg-service-form__description {
    max-width: 720px;
    color: #526779;
    font-size: 16px;
    line-height: 1.5;
}

.article-page-content .tg-service-form__external {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.tg-service-form__external a {
    font-weight: 700;
}

.tg-service-form__focus-sentinel {
    display: none;
}

.tg-service-form.is-focused .tg-service-form__focus-sentinel {
    position: fixed;
    display: block;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.tg-service-form__stage {
    position: relative;
    min-height: 320px;
    background: #fff;
}

.tg-service-form__frame {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 320px;
    border: 0;
    background: #fff;
    transition: height .2s ease;
}

.tg-service-form.has-load-error .tg-service-form__stage {
    display: none;
}

.tg-service-form__skeleton {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    min-height: 320px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: #f8fbfe;
    color: #526779;
    font-size: 15px;
}

.tg-service-form__skeleton[hidden] {
    display: none;
}

.tg-service-form__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #d5e2ed;
    border-top-color: #e98613;
    border-radius: 50%;
    animation: tg-service-form-spin .75s linear infinite;
}

@keyframes tg-service-form-spin {
    to { transform: rotate(360deg); }
}

.tg-service-form__fallback {
    margin: 0;
    padding: 18px 24px 22px;
    border-top: 1px solid #e4ebf1;
    background: #fff8ed;
    text-align: center;
}

.tg-service-form__fallback[hidden] {
    display: none;
}

.article-page-content .tg-service-form__fallback p {
    margin: 0 0 8px;
    color: #5c4a32;
    font-size: 15px;
}

.tg-service-form__fallback a,
.tg-service-form__noscript a {
    font-weight: 800;
}

.tg-service-form__close {
    position: fixed;
    z-index: 3;
    top: 14px;
    right: 18px;
    display: none;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #cad7e3;
    border-radius: 9px;
    background: #fff;
    color: #25445f;
    font: 700 14px/1.2 Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 3px 14px rgba(20, 44, 65, .15);
}

.tg-service-form.is-focused {
    position: fixed;
    z-index: 50020;
    inset: 0;
    display: flex;
    width: auto;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.tg-service-form.is-focused .tg-service-form__header {
    flex: 0 0 auto;
    padding-right: 120px;
}

.tg-service-form.is-focused .tg-service-form__stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.tg-service-form.is-focused .tg-service-form__frame {
    min-height: 100%;
}

.tg-service-form.is-focused .tg-service-form__close {
    display: block;
}

html.tg-service-form-focus-active,
body.tg-service-form-focus-active {
    overflow: hidden !important;
}

.tg-service-form-reference {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 26px 0;
    padding: 18px;
    border: 1px solid #dfe7ef;
    border-radius: 12px;
    background: #f8fbfe;
}

.tg-service-form-reference__button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    background: #ef8b17;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none;
}

.tg-service-form-reference__fallback {
    font-size: 14px;
}

@media (max-width: 640px) {
    .tg-service-form {
        margin: 24px 0;
        border-radius: 12px;
    }

    .tg-service-form__header {
        padding: 18px 16px 10px;
    }

    .article-page-content .tg-service-form__title {
        font-size: 21px;
    }

    .article-page-content .tg-service-form__description {
        font-size: 15px;
    }

    .tg-service-form.is-focused .tg-service-form__header {
        padding: 14px 94px 10px 14px;
    }

    .tg-service-form.is-focused .tg-service-form__description,
    .tg-service-form.is-focused .tg-service-form__eyebrow {
        display: none;
    }

    .tg-service-form__close {
        top: 10px;
        right: 10px;
        min-height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .tg-service-form-reference {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-service-form__spinner { animation-duration: 1.5s; }
    .tg-service-form__frame { transition: none; }
}
