/* image_gen.css - page-specific styles for the AI Image Generator.
   Extracted from the inline <style> block in templates/image_gen/en.html for
   consistency with the reImagine page (which uses reImagine.css) and to
   make translations easier (one shared stylesheet, content-only templates). */

/* Generated-image gallery cards */
.img-gen-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}
.img-gen-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.img-gen-card img {
    width: 100%;
    height: auto;
    display: block;
}
.img-gen-card-body {
    padding: 12px;
}
.img-gen-prompt {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 10px;
    word-break: break-word;
    line-height: 1.4;
}
.img-gen-actions {
    display: flex;
    gap: 8px;
}

/* Reference image previews */
.ref-image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #dee2e6;
}

/* Placeholder "+" card: acts as the "add reference image" button. It is
   injected as the LAST item inside #refPreviews (inline with the
   thumbnails) by renderRefPreviews(), and only while there is room for
   more images (up to the model's max_ref_images). Replaces the bulky
   standalone button so the layout stays compact on mobile. */
.ref-empty-card {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    align-self: flex-start;
    border: 2px dashed #ced4da;
    border-radius: 6px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.ref-empty-card:hover {
    border-color: #2b7a69;
    background: #f8f9fa;
}
.ref-empty-icon {
    font-size: 1.8rem;
    font-weight: 600;
    color: #6c757d;
    line-height: 1;
}

/* Compact generator form */
.gen-form-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}
.gen-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}
.gen-control-label {
    display: flex;
    align-items: center;
    gap: 4px;
}
.gen-control-label span {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .gen-controls {
        grid-template-columns: 1fr;
    }
}
