/* ══════════════════════════════════════════════════════════════════
   jpg-to-pdf.html — page-specific styles (loaded after base.css).
   Font-face, reset, .uz upload zone, .tldr-box/.ref-list, and
   .rts-*/.rc-* rich-content system are covered by base.css.
   The image preview grid below is unique to this page (multi-image
   upload UI, not a PDF page picker) so it stays here.
   ══════════════════════════════════════════════════════════════════ */

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-preview {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.image-preview:hover {
    border-color: #6366f1;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
}

.image-preview img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #f8fafc;
    display: block;
}

.image-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.image-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: #fee2e2;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: #dc2626;
    font-weight: bold;
    transition: all 0.2s ease;
}

.image-remove:hover {
    background: #fca5a5;
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
