/*
 * Optional invitation blocks rendered without a personal photo (renderer v1).
 * The designs overlay text on a photo; without one the text sits on the
 * invitation's primary colour instead of a demonstration picture.
 */
.no-image {
    background-color: var(--color-primary-1, #907053);
}

.no-image > .content-wrap,
.no-image > .text-wrap,
.no-image .thank-box {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
}

.tsc-thank-section .thank-wrapper.no-image .thank-box {
    padding: 72px 16px;
}

.tcs-save-the-date.no-image {
    padding: 48px 16px;
}

.tcs-save-the-date.no-image .text-wrap {
    padding: 0 12px;
}

/* Long words in text entered by the couple never widen the mobile layout. */
.story-text p,
.story-item .content,
.tcs-plan-section .plan-item .content,
.thank-box .message,
.happy-item .message {
    overflow-wrap: anywhere;
}

/* Gift QR modal shared by every template: close button in the top-right corner. */
#modalQr .modal-content {
    position: relative;
}
#modalQr .btn-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    background-size: 14px;
    opacity: 0.6;
}
#modalQr .btn-close:hover,
#modalQr .btn-close:focus-visible {
    opacity: 1;
}
/* The QR keeps a fixed square box whatever the size or ratio of the uploaded image. */
#modalQr img.qr-img {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto 8px;
    padding: 0;
    object-fit: contain;
}
