/* ============================================================
   IMAGE TO PDF TOOL - CSS
============================================================ */

.image-page .dropzone .icon-large i,
.image-page .dropzone i {
    color: var(--primary, #667eea) !important;
}
.image-page .btn-primary i {
    color: white !important;
}

.image-page .arrange-pages-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2px;
    gap: 8px;
}
.image-page .arrange-pages-header h3 {
    margin: 0;
    font-size: 1.1rem;
    margin-right: 20px;
}
.image-page #addMoreFilesBtn {
    font-size: 13px !important;
    padding: 4px 14px !important;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: auto;
}

.image-page .dropzone {
    background: var(--card-bg, #fff);
    border: 2px dashed var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;
    transition: all 0.25s ease;
    cursor: pointer;
}
.image-page .dropzone:hover {
    border-color: var(--primary, #667eea);
    transform: scale(1.01);
}
.image-page .dropzone.dragover {
    background: var(--primary-light, #f0f4ff);
}

.image-page .workbench {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    margin-top: 30px;
}
.image-page .workbench section { min-width: 0; }

.image-page .sidebar {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: 20px;
    height: fit-content;
}
.image-page .sidebar h3 {
    margin-bottom: 15px;
    color: var(--primary, #667eea);
}
.image-page .sidebar-group { margin-bottom: 15px; }
.image-page .sidebar-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main, #1e293b);
}
.image-page .sidebar-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-md, 12px);
    background: white;
}

.image-page .page-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
}

.image-page .page-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 12px;
    width: 180px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.image-page .page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary, #667eea);
}

.image-page .card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 10;
}
.image-page .card-actions .btn-icon {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.image-page .card-actions .btn-icon:hover {
    background: #ef4444;
    transform: scale(1.08);
}

.image-page .preview-container {
    width: 100%;
    height: 160px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.image-page .preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-page .page-labels {
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    margin-top: 5px;
    word-break: break-word;
}
.image-page .page-labels .file-size {
    display: block;
    font-size: 10px;
    color: var(--text-muted, #64748b);
    margin-top: 2px;
}

.image-page .btn-primary {
    background: var(--primary, #667eea);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius-md, 12px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}
.image-page .btn-primary:hover {
    background: var(--primary-hover, #5568d3);
}

.image-page .progress-container {
    width: 100%;
    height: 8px;
    background: var(--border-color, #e2e8f0);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}
.image-page #progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary, #667eea);
    transition: width 0.3s ease;
}
.image-page #progress-text {
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-muted, #64748b);
    margin-top: 8px;
}

.image-page .result-box {
    margin-top: 15px;
    padding: 12px;
    border: 1px solid #d1fae5;
    background: #ecfdf5;
    border-radius: var(--radius-md, 12px);
    display: none;
}
.image-page .result-box strong {
    display: block;
    margin-bottom: 5px;
}
.image-page .result-box a {
    color: var(--primary, #667eea);
    text-decoration: none;
    font-weight: 600;
}

.image-page .sortable-ghost {
    opacity: 0.4;
    background: var(--primary, #667eea);
}

/* ===== TABLET ===== */
@media (max-width: 768px) {
    .image-page .workbench {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .image-page .sidebar { order: 2; width: 100%; }
    .image-page .page-grid { justify-content: center; gap: 15px; }
    .image-page .page-card { width: 150px; }
    .image-page .preview-container { height: 130px; }
    .image-page .arrange-pages-header { flex-direction: column; align-items: stretch; }
    .image-page #addMoreFilesBtn { align-self: flex-start; }
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
    .image-page .dropzone { padding: 20px 15px; }
    .image-page .page-grid { gap: 10px; }
    .image-page .page-card { width: 130px; padding: 8px; }
    .image-page .preview-container { height: 110px; }
    .image-page .card-actions .btn-icon { width: 26px; height: 26px; font-size: 0.8rem; }
    .image-page .page-labels { font-size: 10px; }
    .image-page .btn-primary { padding: 12px 18px; font-size: 14px; }
}