/**
 * In-card photo dropzone — empty-state placeholder rendered inside the
 * live-preview Aurora cover. Contrasting dashed border per card style
 * (dark styles → light border + light text, light styles → dark border).
 *
 * Triggered by the user choosing a card style with no photo selected yet.
 * Click + drag-drop wired by assets/js/in-card-dropzone.js — this file
 * handles only presentation.
 */

.genv2-live-card-photo-slot {
    position: relative;
    width: 100%;
}

/* Phase 6.10 — restored (was temporarily hidden in 6.9). Clicking this empty
   in-card photo area opens the "Choose a photo" picker (in-card-dropzone.js
   openPicker), same as the Step-3 photo zone. */
.genv2-live-card-photo-empty {
    display: grid;
    place-items: center;
    gap: 0.5rem;
    /* Phase 6.10.2 A2 — it's a <button>, which doesn't auto-stretch to the
       parent like a block div. Force full card width so the dashed area
       spans edge-to-edge and is centered, not a partial box on the left. */
    width: 100%;
    box-sizing: border-box;
    border: 3px dashed currentColor;
    border-radius: var(--radius-md, 12px);
    aspect-ratio: 16 / 7;
    padding: 1.5rem 1rem;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s var(--ease-standard), border-color 0.2s var(--ease-standard);
    color: rgba(255, 255, 255, 0.75); /* default = dark cards (Aurora and most premiums) */
    font-family: inherit;
    text-align: center;
}
.genv2-live-card-photo-empty[hidden] { display: none; }
.genv2-live-card-photo-empty:hover,
.genv2-live-card-photo-empty.is-drag {
    background: rgba(255, 255, 255, 0.08);
}
.genv2-live-card-photo-empty:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.genv2-live-card-photo-empty svg {
    width: 38px;
    height: 38px;
    opacity: 0.85;
}

.genv2-live-card-photo-empty__title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
}

.genv2-live-card-photo-empty__hint {
    font-size: 0.72rem;
    opacity: 0.75;
    line-height: 1.3;
}

/* ─── Light card styles → dark dashed border for contrast ─────────── */

.genv2-live-card-wrap[data-style="rose"] .genv2-live-card-photo-empty,
.genv2-live-card-wrap[data-style="marble"] .genv2-live-card-photo-empty,
.genv2-live-card-wrap[data-style="linen"] .genv2-live-card-photo-empty,
.genv2-live-card-wrap[data-style="watercolor"] .genv2-live-card-photo-empty,
.genv2-live-card-wrap[data-style="foil"] .genv2-live-card-photo-empty,
.genv2-live-card-wrap[data-style="sage"] .genv2-live-card-photo-empty,
.genv2-live-card-wrap[data-style="lavender"] .genv2-live-card-photo-empty {
    color: rgba(40, 30, 50, 0.6);
}

.genv2-live-card-wrap[data-style="rose"] .genv2-live-card-photo-empty:hover,
.genv2-live-card-wrap[data-style="rose"] .genv2-live-card-photo-empty.is-drag,
.genv2-live-card-wrap[data-style="marble"] .genv2-live-card-photo-empty:hover,
.genv2-live-card-wrap[data-style="marble"] .genv2-live-card-photo-empty.is-drag,
.genv2-live-card-wrap[data-style="linen"] .genv2-live-card-photo-empty:hover,
.genv2-live-card-wrap[data-style="linen"] .genv2-live-card-photo-empty.is-drag,
.genv2-live-card-wrap[data-style="watercolor"] .genv2-live-card-photo-empty:hover,
.genv2-live-card-wrap[data-style="watercolor"] .genv2-live-card-photo-empty.is-drag,
.genv2-live-card-wrap[data-style="foil"] .genv2-live-card-photo-empty:hover,
.genv2-live-card-wrap[data-style="foil"] .genv2-live-card-photo-empty.is-drag,
.genv2-live-card-wrap[data-style="sage"] .genv2-live-card-photo-empty:hover,
.genv2-live-card-wrap[data-style="sage"] .genv2-live-card-photo-empty.is-drag,
.genv2-live-card-wrap[data-style="lavender"] .genv2-live-card-photo-empty:hover,
.genv2-live-card-wrap[data-style="lavender"] .genv2-live-card-photo-empty.is-drag {
    background: rgba(40, 30, 50, 0.05);
}

/* Mobile — slightly smaller padding */
@media (max-width: 640px) {
    .genv2-live-card-photo-empty {
        padding: 1rem 0.7rem;
        gap: 0.3rem;
    }
    .genv2-live-card-photo-empty svg { width: 30px; height: 30px; }
    .genv2-live-card-photo-empty__title { font-size: 0.85rem; }
    .genv2-live-card-photo-empty__hint { font-size: 0.65rem; }
}

/* ─── Loaded-photo state inside the card ───────────────────────────
 * When the user uploads a photo, the empty dropzone is replaced by the
 * actual image. Hovering reveals a blur+dim overlay with a "Replace
 * photo" prompt; a small × button in the top-right corner removes the
 * photo (returns to the empty state). The whole image area is clickable
 * — opens the same file picker the Step-3 zone uses.
 */
.lc-photo-banner { position: relative; }

.lc-photo-loaded {
    position: relative;
    display: block;
    width: 100%;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    cursor: pointer;
}
.lc-photo-loaded[hidden] { display: none; }

.lc-photo-loaded img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.25s var(--ease-standard);
}

.lc-photo-loaded__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #fff;
    background: rgba(20, 15, 35, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s var(--ease-standard);
    pointer-events: none;
}
.lc-photo-loaded__overlay svg { opacity: 0.95; }
.lc-photo-loaded__overlay-text {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.lc-photo-loaded:hover .lc-photo-loaded__overlay,
.lc-photo-loaded:focus-within .lc-photo-loaded__overlay {
    opacity: 1;
}
.lc-photo-loaded:hover img,
.lc-photo-loaded:focus-within img {
    filter: blur(2px) brightness(0.7);
}

.lc-photo-loaded__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.15s, background 0.15s, transform 0.15s;
    /* Sits ABOVE the hover overlay so the × stays clickable when hovered. */
    z-index: 2;
}
.lc-photo-loaded__remove:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.08);
}
.lc-photo-loaded__remove:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

@media (max-width: 640px) {
    .lc-photo-loaded__remove { width: 24px; height: 24px; font-size: 1.1rem; }
    .lc-photo-loaded__overlay-text { font-size: 0.82rem; }
}
