/* Zehan Invitation Frame Photo - isolated styles; no changes to normal Elementor Image widgets. */
.zfpd-outer {
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
}
.zfpd-stage {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4 / 5;
    flex: 0 1 auto;
    isolation: isolate;
    overflow: visible;
}
.zfpd-photo-window {
    position: absolute;
    top: 14%;
    left: 16%;
    width: 68%;
    height: 72%;
    z-index: 1;
    overflow: hidden;
    border-radius: 50% 50% 10% 10% / 34% 34% 7% 7%;
}
.zfpd-photo-window.zfpd-shape-oval { border-radius: 50%; }
.zfpd-photo-window.zfpd-shape-circle { border-radius: 50%; aspect-ratio: 1; height: auto !important; }
.zfpd-photo-window.zfpd-shape-rounded { border-radius: 18px; }
.zfpd-photo-window.zfpd-shape-square { border-radius: 0; }
.zfpd-photo-window.zfpd-shape-custom { border-radius: 12px; }
.zfpd-photo {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    object-fit: cover;
    object-position: var(--zfpd-focus-x, 50%) var(--zfpd-focus-y, 25%);
    transform: scale(1);
    transform-origin: center center;
    box-shadow: none;
}
.zfpd-frame {
    display: block !important;
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    object-fit: fill;
    opacity: 1;
    transform: scale(1);
    transform-origin: center center;
    z-index: 2;
    pointer-events: none;
}
.zfpd-editor-hint {
    position: absolute;
    inset: 20%;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px;
    border: 1px dashed #ba9b9b;
    border-radius: 12px;
    color: #7b5557;
    background: #fff9f7;
    font: 13px/1.4 sans-serif;
}

/* v1.1.1: Phone-only adjustments. All desktop geometry stays unchanged.
   Original frame used absolute positioning so it did not itself contribute to
   normal layout height; use the real PNG's intrinsic height on narrow screens. */
@media (max-width: 767px) {
    .zfpd-outer {
        box-sizing: border-box;
        padding-top: var(--zfpd-mobile-space-top, 16px);
        padding-bottom: var(--zfpd-mobile-space-bottom, 24px);
        min-width: 0;
        height: auto;
    }

    .zfpd-outer.zfpd-mobile-auto-height .zfpd-stage.zfpd-has-frame {
        display: flow-root;
        height: auto !important;
        min-height: 0;
        aspect-ratio: auto !important;
    }

    .zfpd-outer.zfpd-mobile-auto-height .zfpd-stage.zfpd-has-frame > .zfpd-frame {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        aspect-ratio: auto !important;
        object-fit: contain;
    }
}
