/* ── Image card component ──────────────────────────────────────────────
 * Shared between the public wizard (crear.php) and the admin panel
 * (views/admin/edit.php). Uses --border / --text-muted which both
 * contexts define (the wizard aliases them to --wiz-border / --wiz-text-muted).
 * ──────────────────────────────────────────────────────────────────── */

.img-card {
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
[data-theme="dark"] .img-card { background: rgba(255,255,255,0.03); }
.img-card.is-fallback { opacity: 0.7; }

.img-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }

.img-meta {
    padding: 4px 8px;
    border-top: 1px solid var(--border, #ddd);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.img-meta-text { flex: 1; min-width: 0; }
.img-meta small { display: block; color: var(--text-muted, #888); }
.img-meta small.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.img-actions {
    padding: 6px 8px;
    display: flex;
    gap: 6px;
    border-top: 1px solid var(--border, #ddd);
}

.custom-file-upload { position: relative; display: inline-block; }
.custom-file-upload .file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.custom-file-upload label { cursor: pointer; margin-bottom: 0; }
