.thanks-dialog {
    padding: 0;
    border: 0;
    border-radius: 2.5rem;
    background: var(--bg-white);
    color: var(--text);
    max-width: min(28.5rem, calc(100vw - 1.6rem));
    width: 100%;
    box-shadow: 0 20px 40px -15px rgba(10, 61, 36, 0.05);
}

.thanks-dialog__inner {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: var(--space-3);
    text-align: center;
    box-shadow: 0 20px 40px -15px rgba(10, 61, 36, 0.05);
    border: 1px solid var(--list-item-marker);
    border-radius: 2.5rem;
}

/* Cow illustration: background-image on the dialog, bottom-right corner. */
.thanks-dialog--image {
    position: fixed;
    background-image: url('../../../assets/images/thanks-cow.webp');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: min(12rem, 70%) auto;
}

/* Consultation variant: same layout, text tuned separately from the image variant. */
.thanks-dialog--consultation .thanks-dialog__title {
    font-size: 1.4rem;
}

.thanks-dialog--consultation .thanks-dialog__text {
    font-size: 0.9rem;
}

.thanks-dialog__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 500;
}

.thanks-dialog__subtitle {
    margin: 0;
    font-weight: 500;
    font-size: 2.6rem;
}

.thanks-dialog__text {
    margin: 0;
    font-size: 0.9rem;
    text-align: start;
    color: var(--text);
}

.thanks-dialog__close {
    margin-top: calc(7.5rem - var(--space-3));
}


.thanks-dialog--consultation {}

.thanks-dialog--consultation .thanks-dialog__subtitle {
    margin: 0;
    font-size: .9rem;
    text-align: start;
    font-weight: 400;
}


.thanks-dialog--consultation .thanks-dialog__close {
    margin-top: var(--space-3);
}

/* Mobile layout for bottom sheet (transform/opacity live in assets/css/global.css). */
@media (max-width: 768px) {
    dialog.thanks-dialog {
        width: 100%;
        max-width: 100%;
        margin: auto 0 0;
        border-radius: 2.5rem 2.5rem 0 0;
        max-height: min(92dvh, 100%);
        will-change: transform, opacity;
    }

    dialog.thanks-dialog[open] {
        display: block;
    }

    dialog.thanks-dialog .thanks-dialog__inner {
        position: relative;
        padding: var(--space-5);
    }

    /* Height handed off from the feedback sheet (global.js cctCaptureDialogSheetHeight). */
    dialog.thanks-dialog.has-sheet-height {
        height: var(--cct-sheet-height);
        min-height: var(--cct-sheet-height);
        max-height: min(92dvh, 100%);
        box-sizing: border-box;
    }

    dialog.thanks-dialog.has-sheet-height .thanks-dialog__inner {
        height: 100%;
        min-height: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: start;
        border-radius: 2.5rem 2.5rem 0 0;
    }

    dialog.thanks-dialog.thanks-dialog--image {
        background-size: 70%;
        background-position: calc(125%) bottom;
    }

    dialog.thanks-dialog .thanks-dialog__close {
        /* margin-top: var(--space-5); */
        width: 100%;
        justify-content: center;
        margin-top: auto;
    }

    .thanks-dialog__subtitle {
        font-size: 1.4rem;
        text-align: start;
    }
}