/* =================================================
   UNIVERSAL GREETING CARD & WISHES (UGCW)
   ================================================= */

/* ---------- Base Wrapper ---------- */
.ugcw-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    position: relative;
}

/* ---------- Layout ---------- */
.ugcw-card-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* Desktop layout */
@media (min-width: 769px) {
    .ugcw-card-preview-wrapper {
        flex: 0 0 420px;
    }

     .ugcw-card-controls {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-self: center;
    }
    
    .ugcw-card-controls .ugcw-control-group {
        flex-wrap: wrap;
    }

    .ugcw-name-input {
        margin-right: 0;
    }
}

/* ---------- Card ---------- */
.ugcw-card-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* ---------- Card Inner ---------- */
.ugcw-card-inner {
    position: absolute;
    inset: 0;
    padding: 14%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ---------- Message ---------- */
.ugcw-card-message {
    color: #fff;
    font-size: 1.15rem;
    line-height: 1.6;
    text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}

.ugcw-highlight-word {
    color: #ffd400;
    font-weight: 700;
}

/* ---------- User Info ---------- */
.ugcw-card-user-info {
    position: absolute;
    bottom: 26px;
    left: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ugcw-card-user-info.ugcw-visible {
    display: flex;
}

.ugcw-card-uploaded-photo:empty {
    display: none;
}

.ugcw-card-uploaded-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    background: #fff;
}

.ugcw-card-uploaded-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ugcw-card-user-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    white-space: nowrap;
}

/* ---------- Controls ---------- */
.ugcw-card-controls .ugcw-control-group {
    width: 320px;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ugcw-card-controls .custom-button,
.ugcw-card-controls input[type="text"] {
    width: 150px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Mobile control sizing */
@media (max-width: 768px) {
    .ugcw-card-layout {
        flex-direction: column;
    }

    .ugcw-card-preview-wrapper {
        width: 100%;
        max-width: 420px;
        margin-bottom: 10px;
    }

    .ugcw-card-controls .custom-button,
    .ugcw-card-controls input[type="text"] {
        height: 38px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .ugcw-card-controls .ugcw-control-group {
        margin-bottom: 14px;
    }
    
    .ugcw-sticky-prompt {
        width: 220px;
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 32px;
    }

    .ugcw-sticky-prompt__line-main {
        line-height: 1.35;
    }
}

/* =================================================
   CARD-LEVEL LOADER OVERLAY
   ================================================= */

.ugcw-card-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 5;
}

.ugcw-card-preview::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    opacity: 0;
    animation: ugcw-spin 0.9s linear infinite;
    z-index: 6;
}

.ugcw-card-preview.ugcw-loading::before,
.ugcw-card-preview.ugcw-loading::after {
    opacity: 1;
}

@keyframes ugcw-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ugcw-btn-loading {
    pointer-events: none;
    opacity: 0.75;
}

.ugcw-btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    vertical-align: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    animation: ugcw-btn-spin 0.8s linear infinite;
}

@keyframes ugcw-btn-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}


/* =================================================
   WATERMARK
   ================================================= */

.ugcw-card-preview .ugcw-watermark {
    position: absolute;
    right: 16px;
    bottom: 22px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    letter-spacing: 0.3px;
    pointer-events: none;
    user-select: none;
    z-index: 4;
}

/* ---------- Cropper Modal ---------- */
.ugcw-cropper-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.ugcw-cropper-modal.ugcw-cropper-visible {
    display: flex;
}

.ugcw-cropper-dialog {
    background: #fff;
    border-radius: 12px;
    width: 360px;
    max-width: 90vw;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.ugcw-cropper-body img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* Crop modal footer button spacing */
.ugcw-cropper-footer {
    display: flex;
    justify-content: center;
    gap: 12px; /* space between buttons */
    margin-top: 12px;
}

/* Optional: ensure buttons don’t stretch awkwardly */
.ugcw-cropper-footer .custom-button {
    min-width: 120px;
}


/* =================================================
   STICKY PROMPT (SLICK + TRANSPARENT + ATTENTION)
   ================================================= */

.ugcw-sticky-prompt {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 280px;
    padding: 14px 22px;
    text-align: center;

    /* Glassy translucent look */
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    color: #fff;
    border-radius: 40px;
    cursor: pointer;
    display: none;
    z-index: 99999;

    font-weight: 600;
    letter-spacing: 0.2px;

    box-shadow:
        0 8px 24px rgba(0,0,0,0.35),
        inset 0 0 0 1px rgba(255,255,255,0.12);

    animation: ugcw-pulse 2.8s infinite ease-in-out;
}

.ugcw-sticky-prompt__line-main {
    line-height: 1.4;
}

@keyframes ugcw-pulse {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.035);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.85;
    }
}

.ugcw-section-highlight {
    animation: ugcw-flash 1.5s ease-out;
}

/* Help Floating Button */
.ugcw-help-floating {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 99999;
    font-weight: bold;
    animation: ugcw-pulse 2s infinite;
    font-size: 16px;
}

/* Help Modal */
.ugcw-help-modal {
    display: none;               /* keep hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    font-size: 13px;
}

.ugcw-help-modal.ugcw-visible {
    display: flex;               /* only when active */
}

.ugcw-help-modal-box {
    background: #fff;
    max-width: 700px;
    width: 95%;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.ugcw-help-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #444;
    background: #f2f2f2;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ugcw-help-close:hover {
    background: #ff4d4d;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

.ugcw-help-modal-box {
    animation: ugcwZoomIn 0.25s ease;
}

@keyframes ugcwZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}


@keyframes ugcw-flash {
    0%   { background: rgba(255, 215, 0, 0.15); }
    100% { background: transparent; }
}

.ugcw-active-section h2 {
    color: #d62828;
}


/* =================================================
   Centre Align ANNIVERSARY COUPLE CARD – Birthday STYLES ONLY
   ================================================= */

/* Wrapper marker (non-invasive) */
.ugcw-card-center .ugcw-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ugcw-card-center .ugcw-container-center {
    text-align: center;
    margin-bottom: 18px;
    z-index: 2;
}

/* Couple images row */
.ugcw-card-center .ugcw-center-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 6px;
}

/* Image slots (reuse existing look) */
.ugcw-card-center .ugcw-center-images .ugcw-card-uploaded-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ffffff;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.ugcw-card-center .ugcw-center-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Heart separator between images */
.ugcw-card-center .ugcw-heart-separator {
    font-size: 28px;
    line-height: 1;
    margin: 0 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* ===============================
   COUPLE NAMES
   =============================== */

.ugcw-card-center .ugcw-center-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 6px;
}

.ugcw-card-center .ugcw-card-user-name {
    display: inline;
    margin: 0; 
}

.ugcw-card-center .ugcw-name-heart {
    line-height: 1;
}
/* ===============================
   MESSAGE POSITION TWEAK
   =============================== */

.ugcw-card-center .ugcw-card-message {
    margin-top: 8px;
    text-align: center;
}

/* =========================================
   HTML2CANVAS-SAFE HEART SHAPE
   ========================================= */

.ugcw-heart-shape {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    transform: rotate(-45deg);
    background: #e63946;
}

.ugcw-heart-shape::before,
.ugcw-heart-shape::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #e63946;
    border-radius: 50%;
}

.ugcw-heart-shape::before {
    top: -11px;
    left: 0;
}

.ugcw-heart-shape::after {
    left: 11px;
    top: 0;
}

/* Small version for names */
.ugcw-heart-shape.small {
    width: 14px;
    height: 14px;
}

.ugcw-heart-shape.small::before,
.ugcw-heart-shape.small::after {
    width: 14px;
    height: 14px;
}

.ugcw-heart-shape.small::before {
    top: -7px;
}

.ugcw-heart-shape.small::after {
    left: 7px;
}

/* =========================================
   HTML2CANVAS-SAFE HEART (SVG)
   ========================================= */

.ugcw-heart-svg {
    width: 26px;
    height: 24px;
    fill: #e63946;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.ugcw-heart-svg.small {
    width: 16px;
    height: 14px;
    vertical-align: middle;
}

.ugcw-card-center .ugcw-reset-row {
    position: static !important;
    width: 100%;
    display: flex;
    justify-content: center;
}

.ugcw-card-center .ugcw-btn-reset-photos {
    max-width: 200px;
}

/* ===============================
   MOBILE OPTIMIZATION
   =============================== */

@media only screen and (max-width: 768px) {

    .ugcw-card-center .ugcw-center-images .ugcw-card-uploaded-photo {
        width: 95px;
        height: 95px;
    }

    .ugcw-card-center .ugcw-heart-separator {
        font-size: 24px;
    }

    .ugcw-card-center .ugcw-center-names {
        font-size: 18px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
}