/* ═══════════════════════════════════════════════════════════════════
   QOON Image Style
   Alle Selektoren beginnen mit .ff_el_checkable_photo_holders
   damit NICHTS außerhalb der Image Choice Cards beeinflusst wird.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Grid-Wrapper ────────────────────────────────────────────────── */
.ff_el_checkable_photo_holders {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
}

@media (max-width: 600px) {
    .ff_el_checkable_photo_holders {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .ff_el_checkable_photo_holders {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── Card ────────────────────────────────────────────────────────── */
.ff_el_checkable_photo_holders .ff-el-image-holder {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #fff !important;
    transition: border-color .2s ease, box-shadow .2s ease, transform .18s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    /* FF Button-Styles zurücksetzen */
    color: inherit !important;
    text-align: left !important;
    font-size: inherit !important;
    line-height: inherit !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder:hover {
    border-color: #006bff !important;
    box-shadow: 0 6px 20px rgba(0, 107, 255, .12) !important;
    transform: translateY(-2px) !important;
}

/* ── Bild ────────────────────────────────────────────────────────── */
.ff_el_checkable_photo_holders .ff-el-image-holder .ff-el-image-input-src {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 4 / 3 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #f3f4f6 !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    transition: transform .25s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder:hover .ff-el-image-input-src {
    transform: scale(1.04) !important;
}

/* ── Checkmark Overlay ───────────────────────────────────────────── */
.ff_el_checkable_photo_holders .ff-el-image-holder .ff-el-image-input-src::after {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: #006bff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2.5 7L5.5 10L11.5 4' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat !important;
    opacity: 0 !important;
    transform: scale(0.6) !important;
    transition: opacity .18s ease, transform .18s ease !important;
    box-shadow: 0 2px 6px rgba(0, 107, 255, .4) !important;
}

/* ── Label ───────────────────────────────────────────────────────── */
.ff_el_checkable_photo_holders .ff-el-image-holder .ff-el-form-check-label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 12px 12px !important;
    cursor: pointer !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder .ff-el-form-check-label span {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    transition: color .18s !important;
}

/* ── Input verstecken ────────────────────────────────────────────── */
.ff_el_checkable_photo_holders .ff-el-image-holder .ff-el-form-check-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* ═══ AUSGEWÄHLT ══════════════════════════════════════════════════ */
.ff_el_checkable_photo_holders .ff-el-image-holder:has(.ff-el-form-check-input:checked) {
    border-color: #006bff !important;
    box-shadow: 0 0 0 3px rgba(0, 107, 255, .15) !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder:has(.ff-el-form-check-input:checked) .ff-el-image-input-src::after {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder:has(.ff-el-form-check-input:checked) .ff-el-form-check-label span {
    color: #006bff !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder:has(.ff-el-form-check-input:checked) .ff-el-image-input-src {
    transform: scale(1.03) !important;
}

/* JS Fallback-Klasse für :has() */
.ff_el_checkable_photo_holders .ff-el-image-holder.qoon-is-selected {
    border-color: #006bff !important;
    box-shadow: 0 0 0 3px rgba(0, 107, 255, .15) !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder.qoon-is-selected .ff-el-image-input-src::after {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.ff_el_checkable_photo_holders .ff-el-image-holder.qoon-is-selected .ff-el-form-check-label span {
    color: #006bff !important;
}

/* ═══ MOBILE ═════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .ff_el_checkable_photo_holders .ff-el-image-holder:hover {
        transform: none !important;
    }
    .ff_el_checkable_photo_holders .ff-el-image-holder .ff-el-form-check-label span {
        font-size: 14px !important;
    }
}

/* ═══ FOKUS ══════════════════════════════════════════════════════ */
.ff_el_checkable_photo_holders .ff-el-image-holder:focus-within {
    outline: 2px solid #006bff !important;
    outline-offset: 2px !important;
}
