/**
 * Copyright 2026 LÍNEA GRÁFICA E.C.E S.L.
 * LGComments – Image upload styles
 */

/* ── Upload container ─────────────────────────────────────────────────────── */
.lgcomments-image-upload {
    margin: 10px 0;
}

.lgcomments-image-upload label.form-control-label,
.lgcomments-image-upload > label:not(.lgcomments-file-label) {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

/* ── Hidden file input / custom button ───────────────────────────────────── */
.lgcomments-file-label {
    cursor: pointer;
    display: inline-block;
}

.lgcomments-file-label .lgcomments-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.lgcomments-file-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f8f8f8;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.lgcomments-file-btn:hover {
    background: #e8e8e8;
}

/* ── Preview grid ─────────────────────────────────────────────────────────── */
.lgcomments-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.lgcomments-image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.lgcomments-image-preview-item img.lgcomments-preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Remove button ────────────────────────────────────────────────────────── */
.lgcomments-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    line-height: 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgcomments-image-remove:hover {
    background: rgba(200, 0, 0, 0.85);
}

/* ── Hints & warnings ─────────────────────────────────────────────────────── */
.lgcomments-image-hint {
    display: block;
    color: #888;
    font-size: 11px;
    margin-top: 4px;
}

.lgcomments-max-warning {
    display: block;
    color: #c0392b;
    font-size: 12px;
    margin-top: 4px;
}

/* ── Review display: thumbnail gallery ───────────────────────────────────── */
.lgcomment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.lgcomment-image-link {
    display: block;
    width: 70px;
    height: 70px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.lgcomment-image-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s;
}

.lgcomment-image-link:hover .lgcomment-image-thumb {
    opacity: 0.85;
}
