.mpc-slider {
    width: 100%;
    margin: 0 8px 0 0;
    accent-color: #764ba2;
    vertical-align: middle;
}

#mpc-title-size-value {
    font-weight: bold;
    color: #764ba2;
    font-size: 16px;
    margin-right: 10px;
}
/* Mid PhotoCard Frontend Styles */

.mid-photocard-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mid-photocard-icon-link {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* 40% solid, gradient from 40% to 50% */
    background: linear-gradient(135deg, #667eea 0%, #667eea 40%, #764ba2 50%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    padding: 8px;
    position: relative;
}

.mid-photocard-icon-link:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.mid-photocard-icon-link:active {
    transform: scale(0.95);
}

.mid-photocard-icon-link img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.mid-photocard-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mid-photocard-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #333;
}

.mid-photocard-floating:hover .mid-photocard-tooltip {
    opacity: 1;
}

/* Pulse animation on load */
.mid-photocard-floating.pulse .mid-photocard-icon-link {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mid-photocard-floating {
        bottom: 15px;
        right: 15px;
    }
    
    .mid-photocard-icon-link {
        width: 50px;
        height: 50px;
    }
    
    .mid-photocard-tooltip {
        display: none;
    }
}

/* Hide on very small screens */
@media (max-width: 480px) {
    .mid-photocard-icon-link {
        width: 45px;
        height: 45px;
    }
}

/* Modal Styles */
.mid-photocard-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mid-photocard-modal-content {
    background-color: #fefefe;
    margin: 1% auto;
    padding: 10px;
    border-radius: 10px;
    width: 90%;
    max-width: 1180px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    text-align: left;
}

/* Header (matches screenshot: title left, actions right, close far-right) */
.mid-photocard-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 12px;
    background: #d8e2eb;
    border-radius: 6px;
}

.mid-photocard-modal-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #333;
    text-align: left;
}

.mid-photocard-modal-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
}

.mid-photocard-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Hide header actions until a result is shown */
.mid-photocard-modal-content:not(.has-result) .mid-photocard-header-actions {
    display: none;
}

/* Close button inside header */
.mid-photocard-close {
    float: none;
    background: transparent;
    border: 0;
    padding: 6px 10px;
    border-radius: 6px;
}

.mid-photocard-close:hover,
.mid-photocard-close:focus {
    background: #f2f2f200;
}

/* Builder layout (sidebar + preview + bottom chooser) */
.mid-photocard-builder {
    width: 100%;
    margin-top: 10px;
}

.mid-photocard-builder-main {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.mid-photocard-sidebar {
    width: 50%;
    border: 1px solid #d5d5da;
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
}

.mpc-side-section {
    padding-bottom: 14px;
}

.mpc-side-header {
    padding: 10px 14px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, #2b2f3a 0%, #2b2f3a 70%, #cfcfd4 100%);
}

.mpc-swatch-row {
    display: flex;
    gap: 12px;
    padding: 12px 14px 6px;
}

.mpc-swatch {
    flex: 1;
    height: 58px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.18);
    cursor: pointer;
    outline: none;
}

.mpc-swatch-row .mpc-swatch:nth-child(1) { background: #2b2f3a; }
.mpc-swatch-row .mpc-swatch:nth-child(2) { background: #8b0000; }
.mpc-swatch-row .mpc-swatch:nth-child(3) { background: #6b57ff; }

.mpc-swatch:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.35);
}

.mpc-side-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 0;
    flex-wrap: nowrap;
}

.mpc-side-row-colors {
    flex-wrap: nowrap;
    align-items: center;
}

.mpc-side-row-colors label {
    white-space: nowrap;
}

.mpc-side-row-colors #mpc-reset-all {
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
    padding: 6px 12px;
    height: 30px;
    width: -webkit-fill-available;
    line-height: 18px;
    color: #2c2f3a;
    background: #d9e2eb;
}

.mpc-side-row label {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.mpc-text,
.mpc-number {
    width: calc(100% - 28px);
    margin: 12px 14px 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #bdbdc6;
    background: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

.mpc-number {
    width: 140px;
    margin: 0;
}

.mpc-color {
    height: 44px;
    width: 80px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid #bdbdc6;
    background: #fff;
    cursor: pointer;
}

.mpc-color-wide {
    width: 240px;
}

/* Title Shadow toggle (keeps existing UI style) */
.mpc-shadow-box {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #bdbdc6;
    background: #fff;
    box-sizing: border-box;
    user-select: none;
    white-space: nowrap;
}

.mpc-shadow-box input {
    margin: 0;
}

/* Make native color inputs look like solid rectangles */
.mpc-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.mpc-color::-webkit-color-swatch {
    border: none;
    border-radius: 9px;
}

.mpc-color::-moz-color-swatch {
    border: none;
    border-radius: 9px;
}

.mid-photocard-preview-pane {
    flex: 1;
    min-width: 0;
    text-align: center;
}

/* Bottom chooser strip */
.mid-photocard-design-strip {
    margin-top: 10px;
    width: 100%;
    background: #f2f2f2;
    border: 1px solid #d5d5da;
    border-radius: 10px;
    overflow: hidden;
}

.mpc-strip-header {
    background: #2b2f3a;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    padding: 10px 14px;
    text-align: center;
}

.mpc-strip-content {
    display: flex;
    gap: 18px;
    padding: 14px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.mpc-design-option {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.mpc-design-thumb {
    width: 190px;
    height: 120px;
    border-radius: 6px;
    border: 3px solid transparent;
    background: #e5e5e5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    overflow: hidden;
}

.mpc-design-option.is-active .mpc-design-thumb {
    border-color: #667eea;
}

/* Simple mock thumbnails (replace with real images later) */
.mpc-thumb-1 {
    background-image: url('../images/Design_1_img.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mpc-thumb-2 {
    background-image: url('../images/Design_2_img.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mpc-thumb-3 {
    background-image: url('../images/Design_3_img.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mpc-thumb-4 {
    /* Fallback to Design 3 thumbnail if Design 4 asset is missing */
    background-image: url('../images/Design_4_img.jpg'), url('../images/Design_3_img.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Design 2 currently clones Design 1 (no extra overrides). */

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mid-photocard-close {
    color: #ff0606;
    float: right;
    font-size: 32px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.mid-photocard-close:hover,
.mid-photocard-close:focus {
    color: #ff7300;
}

.mid-photocard-modal-content h2 {
    color: #333;
    font-size: 24px;
}

.modal-loading {
    text-align: center;
    padding: 40px 20px;
}

.modal-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.modal-loading p {
    color: #666;
    font-size: 16px;
}

.modal-result {
    text-align: center;
}

#mid-photocard-result-image {
    margin-bottom: 0px;
}

/* Preview scaling inside popup (does NOT change generated/downloaded size) */
#mid-photocard-result-image {
    display: flex;
    justify-content: center;
}

#mid-photocard-result-image > img,
#mid-photocard-result-image .mid-photocard-html-preview {
    width: 100%;
    max-width: 100%;
}

#mid-photocard-result-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 2px 2px 6px 1px rgb(0 0 0 / 20%);
}

.mid-photocard-html-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: var(--backgroundplate);
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button.mpc-swatch.is-active {
    padding: 0 100px;
}

.logoipop {
    width: 40px;
    height: 75px;
    border-radius: 0 0 25px 25px;
    position: absolute;
    z-index: 99;
    right: 0px;
    margin: 0 30px;
    overflow: hidden;
    padding: 0 7px;
    top: 0;
}

/* Explicit sides so we can render both logo + icon */
.mid-photocard-html-preview .logoipop.logo-right {
    right: 0px;
    left: auto;
}


.mid-photocard-html-preview .logo-left {
    left: 0px;
    right: auto;
    top: 0px;
    margin: 4px 2px;
    border-radius: 0;
    background: none;
    width: auto;
    height: 45px;
    overflow: hidden;
    padding: 5px;
    z-index: 99;
    position: absolute;
}


/* Match Design 4: logo has no plate background */
.mid-photocard-html-preview .logo-left::before {
    display: none;
}

/* Design 2: only the ICON (logo-right) is centered */
.mid-photocard-html-preview.mpc-design-2 .logoipop.logo-right {
    z-index: 1;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    right: auto;
    padding: 10px;
    margin: 0px;
    left: 50%;
    top: -5%;
    transform: translate(-50%, -50%);
    padding: 15px;
}

.logoipop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--backgroundplate);
    opacity: 0.7;
    border-radius: inherit;
    z-index: 0;
}

.mid-photocard-html-preview.mpc-design-2 .logoipop.logo-right img.logpop {
    width: 42px !important;
    height: 90% !important;
}

/* Design 2 only: use "1st color" for the logo plate background */
.mid-photocard-html-preview.mpc-design-2 .logoipop.logo-right::before {
    background: var(--mpc-bg-color-1, var(--backgroundplate));
    opacity: 1;
}

/* Design 4: Logo on left, Icon on right */
.mid-photocard-html-preview.mpc-design-4 .logo-left {
    left: 0px;
    margin: 4px 2px;
    border-radius: 0;
    background: none;
    width: auto;
    height: 46px;
    overflow: hidden;
    padding: 5px;
    z-index: 99;
    position: absolute;
}

#mid-photocard-result-image .logo-left img,
.mid-photocard-html-preview .logo-left img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

.mid-photocard-html-preview.mpc-design-4 .logoipop.logo-right {
    right: 0px;
    left: auto;
    margin: 0 30px;
    border-radius: 0 0 25px 25px;
}

/* Design 4: separate layout (matches provided screenshot) */
.mid-photocard-html-preview.mpc-design-4 {
    /* keep using --backgroundplate, but make sure all children sit above */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* In Design 4 we render our own layout, so ensure legacy blocks don't interfere */
.mid-photocard-html-preview.mpc-design-4 .mpc-bg,
.mid-photocard-html-preview.mpc-design-4 .infomationbgtxt,
.mid-photocard-html-preview.mpc-design-4 .textalig,
.mid-photocard-html-preview.mpc-design-4 .footerinfo,
.mid-photocard-html-preview.mpc-design-4 .mpc-dc {
    display: none;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-solid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--backgroundplate);
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-photo-frame {
    position: absolute;
    left: 2%;
    right: 2%;
    top: 10%;
    height: 52%;
    background: #fff;
    border-radius: 65px 0;
    padding: 6px;
    box-sizing: border-box;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    z-index: 2;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-photo {
    width: 100%;
    height: 100%;
    border-radius: 60px 0;
    background-size: cover;
    background-position: center;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-title-wrap {
    position: absolute;
    left: 2%;
    right: 2%;
    bottom: 18%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-title-wrap .mpc-title {
    width: 96%;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-comments {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 9%;
    height: 6.5%;
    min-width: 42%;
    max-width: 78%;
    padding: 0 22px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mpc-dc-center, #e41c18);
    border-radius: 10px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
    z-index: 2;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-comments span {
    color: var(--mpc-dc-text, #fff);
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-comments span {
    text-overflow: clip;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    box-sizing: border-box;
    z-index: 2;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-d4-footer-left,
.mid-photocard-html-preview.mpc-design-4 .mpc-d4-footer-right {
    color: #111;
    font-size: medium;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48%;
}

.logoipop img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

img.logpop {
    width: 40px !important;
    height: 100% !important;
    position: relative;
    box-shadow: none !important;
}

/* Category/Date row: keep all three controls on one line */
.mpc-catdate-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin: 12px 14px 0;
    flex-wrap: nowrap;
}

.mpc-comments-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 12px 14px 0;
    flex-wrap: nowrap;
}

.mpc-comments-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
}

.mpc-comments-row #mpc-comments-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin: 0;
}

.mpc-catdate-row #mpc-category-input,
.mpc-catdate-row #mpc-date-input {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin: 0;
}

.mpc-catdate-row #mpc-dc-bg-color {
    width: 72px;
    height: 44px;
    margin: 0;
}

.infomationbgtxt {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    height: 35%;
    z-index: 2;
    pointer-events: none;
    box-sizing: border-box;
}
.infomationbgtxt > * {
    pointer-events: auto;
}

.mid-photocard-html-preview .textalig {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
}

.mid-photocard-html-preview .mpc-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 65%;
    background-size: cover;
    background-position: center;
}

/* Design 3 only: fade the image at the bottom edge */
.mid-photocard-html-preview.mpc-design-3 .mpc-bg {
    -webkit-mask-image: linear-gradient(to bottom, #000000 50%, transparent 95% 100%);
    mask-image: linear-gradient(to bottom, #000000 50%, #00000000 95%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
}

.mid-photocard-html-preview.mpc-design-3 .mpc-solid {
    background: none;
}

.mid-photocard-html-preview .mpc-solid {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--backgroundplate);
}

/* Design 3 only: fade the plate at the top edge */
.mid-photocard-html-preview.mpc-design-3 .mpc-solid {
    -webkit-mask-image: linear-gradient(to top, #000 95%, transparent 110%);
    mask-image: linear-gradient(to top, #000 95%, transparent 110%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
}

.mid-photocard-html-preview .textalig .mpc-title {
    position: static;
    left: auto;
    transform: none;
    width: 90%;
    text-align: center;
    margin: 2px 0 0px;
}

.mid-photocard-html-preview .mpc-dc {
    color: var(--mpc-dc-text, #fff);
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(to right, transparent 0%, var(--mpc-dc-center, #e41c18) 50%, transparent 100%);
    padding: 2px 14px;
    border-radius: 6px;
    width: 55%;
}

/* Design 2 only: keep current DC styling explicitly 
.mid-photocard-html-preview.mpc-design-2 .mpc-dc {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(to right, transparent 0%, var(--mpc-dc-center, #e41c18) 50%, transparent 100%);
    padding: 6px 14px;
    border-radius: 6px;
    width: 55%;
} */

.mid-photocard-html-preview .mpc-title {
    color: rgb(255,237,0);
    font-size: 35px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.55);
    padding: 8px 0 6px 0;
    height: 92px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mid-photocard-html-preview.mpc-design-4 .mpc-title {
    padding: 6px 0;
    height: 110px;
}

.mid-photocard-html-preview .mpc-title span {
    display: block;
    width: 96%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.mid-photocard-html-preview .mpc-site {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
    padding: 10px 14px;
    border-radius: 6px;
    width: auto;
}

.mid-photocard-html-preview .footerinfo {
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin: 8px 0 15px 0;
    flex-wrap: nowrap;
    background: linear-gradient(to right, transparent 0%, var(--mpc-dc-center, #e41c18) 50%, transparent 100%);
    border-radius: 6px;
}

/* Design 2 only */
.mid-photocard-html-preview.mpc-design-2 .footerinfo {
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin: 1px 0;
    flex-wrap: nowrap;
    background: linear-gradient(to right, transparent 0%, var(--mpc-dc-center, #e41c18) 50%, transparent 100%);
    border-radius: 6px;
}

.mid-photocard-html-preview .footerinfo.no-comments {
    justify-content: center;
}

.mid-photocard-html-preview .footerinfo .mpc-site,
.mid-photocard-html-preview .footerinfo .mpc-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    flex: 1 1 0;
}

.mid-photocard-html-preview .footerinfo .mpc-site span,
.mid-photocard-html-preview .footerinfo .mpc-comments span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mid-photocard-html-preview .footerinfo .mpc-comments span {
    text-overflow: clip;
}

.mid-photocard-html-preview .footerinfo .mpc-comments {
    color: var(--mpc-dc-text, #fff);
    font-size: 20px;
    font-weight: 600;
    background: transparent;
    padding: 0px 14px;
    border-radius: 6px;
    white-space: nowrap;
}

.mid-photocard-html-preview .footerinfo .mpc-site {
    color: var(--mpc-dc-text, #fff);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.photocard-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.photocard-btn-primary {
    /* 40% solid, gradient from 40% to 50% */
    background: #4760c1;
    color: #fff;
}

.photocard-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.photocard-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.photocard-btn-secondary:hover {
    background: #6d6c99;
    transform: translateY(-2px);
}

.modal-error {
    text-align: center;
    padding: 20px;
}

.modal-error .error-message {
    color: #d63638;
    font-size: 16px;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff5f5;
    border: none;
    border-radius: 4px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .mid-photocard-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 10px;
        overflow-x: auto;
    }
    
    .mid-photocard-modal-content h2 {
        font-size: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .photocard-btn {
        width: 100%;
    }

    /* Make preview smaller on small screens (as requested) */
    #mid-photocard-result-image > img,
    #mid-photocard-result-image .mid-photocard-html-preview {
        width: 60%;
        max-width: 700px;
    }

    /* Keep sidebar on the left like the reference; allow horizontal scroll on small screens */
    .mid-photocard-builder-main {
        min-width: 980px;
    }

    .mpc-strip-content {
        justify-content: center;
    }
}
:root {
    --backgroundplate: #764ba2;
}