.td-mc {
    --td-mc-bar: 0px;
    --td-mc-gap: 16px;
    --td-mc-ink: #26372f;
    --td-mc-red: #821c32;
    --td-mc-bottom: calc(max(var(--td-mc-gap), env(safe-area-inset-bottom)) + var(--td-mc-bar));
    position: fixed;
    z-index: 35;
    inset-inline-end: max(var(--td-mc-gap), env(safe-area-inset-right));
    bottom: var(--td-mc-bottom);
    color: var(--td-mc-ink);
    font: 400 16px/1.45 system-ui, sans-serif;
    text-align: start;
}

.td-mc *, .td-mc *::before, .td-mc *::after {
    box-sizing: border-box;
}

.td-mc [hidden] {
    display: none !important;
}

.td-mc__card {
    position: relative;
    display: grid;
    width: min(390px, calc(100vw - 2 * var(--td-mc-gap)));
    max-height: calc(100vh - var(--td-mc-bottom) - var(--td-mc-gap));
    max-height: calc(100dvh - var(--td-mc-bottom) - var(--td-mc-gap));
    overflow: auto;
    padding: 12px;
    gap: 12px;
    margin: 0;
    border: 1px solid #e9ddcf;
    border-radius: 20px;
    background: #fffaf3;
    box-shadow: 0 12px 36px rgb(34 22 14 / 22%);
    scrollbar-width: thin;
}

.td-mc img.td-mc__photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 661 / 502;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    margin: 0;
}

.td-mc__content {
    min-width: 0;
    padding-inline: 4px;
    display: grid;
    gap: 4px;
}

.td-mc .td-mc__eyebrow, .td-mc .td-mc__title, .td-mc .td-mc__description {
    margin: 0;
}

.td-mc__eyebrow {
    color: var(--td-mc-red);
    font-size: .8rem;
    font-weight: 750;
}

.td-mc__title {
    color: var(--td-mc-ink);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.16;
    text-wrap: balance;
}

.td-mc__description {
    color: #45534b;
    font-size: .94rem;
}

.td-mc button.td-mc__close {
    position: absolute;
    inset: 8px 8px auto auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #dfd5ca;
    background: #fff;
    color: #2d332f;
    cursor: pointer;
    font: 500 26px/1 system-ui, sans-serif;
    z-index: 1;
}

.td-mc a.td-mc__cta, .td-mc a.td-mc__corner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45em;
    min-height: 44px;
    padding: 9px 13px;
    margin: 0;
    color: #fff;
    background: var(--td-mc-red);
    border-radius: 12px;
    font: 750 .92rem/1.25 system-ui, sans-serif;
    text-decoration: none;
    text-align: center;
}

.td-mc a.td-mc__corner {
    border-radius: 100px;
    box-shadow: 0 4px 18px rgb(34 22 14 / 20%);
}

.td-mc a.td-mc__cta:hover, .td-mc a.td-mc__corner:hover {
    background: #641329;
    color: #fff;
    text-decoration: underline;
}

.td-mc a:focus-visible, .td-mc button:focus-visible {
    outline: 3px solid #104b3e;
    outline-offset: 2px;
}

@media (max-width: 767px), (max-height: 650px) {
    .td-mc {
        --td-mc-gap: 12px;
    }

    .td-mc__card {
        grid-template-columns: min(30%, 112px) minmax(0, 1fr);
        align-items: center;
        width: min(380px, calc(100vw - 2 * var(--td-mc-gap)));
        padding-top: 42px;
        gap: 10px;
    }

    .td-mc__content {
        padding: 0;
    }

    .td-mc__title {
        font-size: 1.04rem;
    }

    .td-mc__description {
        font-size: .83rem;
    }

    .td-mc a.td-mc__cta {
        grid-column: 1 / -1;
    }

    .td-mc button.td-mc__close {
        inset: 1px 2px auto auto;
        border-color: transparent;
        background: transparent;
    }
}
