/**
 * PDF Converter CSS - Clean White/Gray Design
 * Extends image converter styles for PDF ↔ JPG conversion
 */

/* Inherit base variables from image converter */
:root {
    --ic-primary-color: #4a5568;
    --ic-success-color: #48bb78;
    --ic-warning-color: #ed8936;
    --ic-danger-color: #f56565;
    --ic-info-color: #4299e1;
    --ic-gray-50: #f9fafb;
    --ic-gray-100: #f3f4f6;
    --ic-gray-200: #e5e7eb;
    --ic-gray-300: #d1d5db;
    --ic-gray-400: #9ca3af;
    --ic-gray-500: #6b7280;
    --ic-gray-600: #4b5563;
    --ic-gray-700: #374151;
    --ic-gray-800: #1f2937;
    --ic-gray-900: #111827;
    --ic-border-radius: 6px;
    --ic-transition: all 0.2s ease;
}

/* PDF Converter specific containers */
.pdf-converter-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ic-gray-800);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdf-converter-container * {
    box-sizing: border-box;
	-ms-overflow-style: none; /* IE và Edge Legacy */
}

/* JPG to PDF specific styles */
.jpg-to-pdf-converter .converter-icon {
    color: #dc2626;
}

.jpg-to-pdf-converter .converter-title {
    color: #dc2626;
}

.jpg-to-pdf-converter .upload-icon {
    color: #dc2626;
}

/* PDF to JPG specific styles */
.pdf-to-jpg-converter .converter-icon {
    color: #2563eb;
}

.pdf-to-jpg-converter .converter-title {
    color: #2563eb;
}

.pdf-to-jpg-converter .upload-icon {
    color: #2563eb;
}

/* Selected Images Section (JPG to PDF) */
.selected-images-section {
    margin-bottom: 32px;
    background: var(--ic-gray-50);
    border: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
}

.selected-images-section .section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ic-gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 24px;
    background: var(--ic-gray-100);
    border-bottom: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius) var(--ic-border-radius) 0 0;
}

.selected-images-section .file-count {
    margin-left: auto;
    font-size: 14px;
    color: var(--ic-gray-500);
    background: var(--ic-gray-200);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.selected-images-list {
    padding: 20px;
    display: grid;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.selected-image-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
    gap: 12px;
    transition: var(--ic-transition);
}

.selected-image-item:hover {
    background: var(--ic-gray-50);
    border-color: var(--ic-gray-300);
}

.image-preview {
    width: 50px;
    height: 50px;
    background: var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--ic-gray-500);
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--ic-border-radius);
}

.image-info {
    min-width: 0;
}

.image-name {
    font-weight: 500;
    color: var(--ic-gray-800);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.image-details {
    font-size: 12px;
    color: var(--ic-gray-500);
    display: flex;
    gap: 12px;
}

.image-remove {
    width: 24px;
    height: 24px;
    border: 1px solid var(--ic-danger-color);
    background: white;
    color: var(--ic-danger-color);
    border-radius: var(--ic-border-radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ic-transition);
}

.image-remove:hover {
    background: var(--ic-danger-color);
    color: white;
}

/* PDF Pages Section (PDF to JPG) */
.pdf-pages-section {
    margin-bottom: 32px;
    background: var(--ic-gray-50);
    border: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
}

.pdf-pages-section .section-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ic-gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 24px 0;
}

.bulk-actions {
    padding: 0 24px 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-action-btn {
    padding: 6px 12px;
    border: 1px solid var(--ic-gray-300);
    background: white;
    color: var(--ic-gray-700);
    border-radius: var(--ic-border-radius);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ic-transition);
}

.bulk-action-btn:hover {
    background: var(--ic-gray-50);
    border-color: var(--ic-primary-color);
    color: var(--ic-primary-color);
}

.bulk-action-btn:active {
    background: var(--ic-primary-color);
    color: white;
}

.pages-grid {
    padding: 0 24px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.page-item {
    border: 2px solid var(--ic-gray-300);
    border-radius: var(--ic-border-radius);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--ic-transition);
    background: white;
    position: relative;
}

.page-item:hover {
    border-color: var(--ic-primary-color);
    background: var(--ic-gray-50);
}

.page-item.selected {
    border-color: var(--ic-success-color);
    background: #f0fff4;
    box-shadow: 0 0 0 1px var(--ic-success-color);
}

.page-item.selected::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: var(--ic-success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.page-preview {
    width: 100%;
    height: 80px;
    background: var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 24px;
    color: var(--ic-gray-500);
}

.page-number {
    font-size: 12px;
    font-weight: 500;
    color: var(--ic-gray-600);
}

.page-item.selected .page-number {
    color: var(--ic-success-color);
    font-weight: 600;
}

/* Results Section (PDF to JPG) */
.results-section {
    margin-bottom: 30px;
    background: white;
    border: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
}

.results-header {
    padding: 24px 24px 16px;
    background: var(--ic-gray-50);
    border-bottom: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius) var(--ic-border-radius) 0 0;
}

.results-header .section-title {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--ic-gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-summary {
    background: white;
    padding: 16px;
    border: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
    font-size: 14px;
    color: var(--ic-gray-600);
}

.results-actions {
    padding: 16px 24px;
    background: var(--ic-gray-50);
    border-bottom: 1px solid var(--ic-gray-200);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.results-actions .batch-action-btn {
    padding: 12px 20px;
    border-radius: var(--ic-border-radius);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--ic-transition);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    text-decoration: none;
    border: 1px solid;
}

.download-all-btn {
    background: var(--ic-info-color);
    color: white;
    border-color: var(--ic-info-color);
}

.download-all-btn:hover {
    background: #3182ce;
    border-color: #3182ce;
}

.convert-another-btn {
    background: var(--ic-gray-500);
    color: white;
    border-color: var(--ic-gray-500);
}

.convert-another-btn:hover {
    background: var(--ic-gray-600);
    border-color: var(--ic-gray-600);
}

.results-list {
    padding: 24px;
    display: grid;
    gap: 12px;
}

.result-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    padding: 16px;
    background: var(--ic-gray-50);
    border: 1px solid var(--ic-gray-200);
    border-radius: var(--ic-border-radius);
    gap: 16px;
    transition: var(--ic-transition);
}

.result-item:hover {
    background: var(--ic-gray-100);
    border-color: var(--ic-gray-300);
}

.result-icon {
    font-size: 20px;
    color: var(--ic-success-color);
}

.result-info {
    min-width: 0;
}

.result-name {
    font-weight: 500;
    color: var(--ic-gray-800);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.result-details {
    font-size: 12px;
    color: var(--ic-gray-500);
}

.result-download {
    padding: 8px 16px;
    background: var(--ic-success-color);
    color: white;
    border: 1px solid var(--ic-success-color);
    border-radius: var(--ic-border-radius);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: var(--ic-transition);
    cursor: pointer;
}

.result-download:hover {
    background: #38a169;
    border-color: #38a169;
}

/* Enhanced Options Layout */
.pdf-converter-container .options-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pdf-converter-container .page-settings-group {
    background: #fef7f0;
    border-color: #fed7aa;
}

.pdf-converter-container .layout-settings-group {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.pdf-converter-container .quality-settings-group {
    background: #f0fff4;
    border-color: #c6f6d5;
}

.pdf-converter-container .color-settings-group {
    background: #fdf4ff;
    border-color: #e9d5ff;
}

/* Progress enhancements for PDF processing */
.pdf-converter-container .conversion-progress-section {
    background: linear-gradient(135deg, var(--ic-gray-50) 0%, #f8fafc 100%);
}

.pdf-converter-container .progress-details {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* Success section for PDF */
.pdf-converter-container .success-section {
    background: linear-gradient(135deg, #f0fff4 0%, #ecfdf5 100%);
    border: 2px solid #c6f6d5;
}

.pdf-converter-container .success-icon {
    font-size: 32px;
    color: var(--ic-success-color);
}

/* Button enhancements */
.pdf-converter-container .convert-button {
    background: linear-gradient(135deg, var(--ic-success-color) 0%, #38a169 100%);
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pdf-converter-container .convert-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-1px);
}

.pdf-converter-container .convert-button:disabled {
    background: var(--ic-gray-400);
    box-shadow: none;
    transform: none;
}

/* PDF specific button colors */
.jpg-to-pdf-converter .convert-button {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.jpg-to-pdf-converter .convert-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.pdf-to-jpg-converter .convert-button {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.pdf-to-jpg-converter .convert-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

/* Enhanced preset buttons */
.pdf-converter-container .preset-btn {
    padding: 16px;
    border: 2px solid var(--ic-gray-300);
    border-radius: var(--ic-border-radius);
    background: white;
    cursor: pointer;
    transition: var(--ic-transition);
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.pdf-converter-container .preset-btn:hover {
    border-color: var(--ic-primary-color);
    background: var(--ic-gray-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pdf-converter-container .preset-btn.active {
    border-color: var(--ic-success-color);
    background: var(--ic-success-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* Loading states and disabled interface */
.pdf-converter-container.conversion-in-progress {
    position: relative;
}

.pdf-converter-container.conversion-in-progress .upload-area {
    background: var(--ic-gray-100) !important;
    border-color: var(--ic-gray-300) !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.pdf-converter-container.conversion-in-progress .upload-area .upload-text {
    color: var(--ic-gray-400) !important;
}

.pdf-converter-container.conversion-in-progress .upload-area .upload-subtext {
    color: var(--ic-gray-400) !important;
}

.pdf-converter-container.conversion-in-progress .preset-btn.disabled,
.pdf-converter-container.conversion-in-progress .bulk-action-btn.disabled,
.pdf-converter-container.conversion-in-progress .page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--ic-gray-100) !important;
    border-color: var(--ic-gray-300) !important;
    color: var(--ic-gray-400) !important;
}

.pdf-converter-container.conversion-in-progress .image-remove.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pdf-converter-container.conversion-in-progress select:disabled,
.pdf-converter-container.conversion-in-progress input:disabled,
.pdf-converter-container.conversion-in-progress button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--ic-gray-100) !important;
    border-color: var(--ic-gray-300) !important;
    color: var(--ic-gray-400) !important;
}

/* Conversion progress overlay */
.pdf-converter-container.conversion-in-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 5;
    pointer-events: none;
}

/* Progress section should remain interactive */
.pdf-converter-container .conversion-progress-section {
    position: relative;
    z-index: 10;
}

.pdf-converter-container .conversion-progress-section * {
    pointer-events: auto !important;
}

.pdf-converter-container .loading {
    position: relative;
    pointer-events: none;
}

.pdf-converter-container .loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    border-radius: var(--ic-border-radius);
    z-index: 10;
}

.pdf-converter-container .loading::before {
    content: '⏳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 11;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Error states */
.pdf-converter-container .error-section {
    background: linear-gradient(135deg, #fef2f2 0%, #fdf2f8 100%);
    border: 2px solid #fecaca;
}

/* Theme variations */
.pdf-converter-theme-dark {
    background: #1f2937;
    color: #f9fafb;
}

.pdf-converter-theme-dark .upload-area {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.pdf-converter-theme-minimal {
    box-shadow: none;
    border: 1px solid var(--ic-gray-200);
}

.pdf-converter-theme-minimal .converter-header {
    border-bottom: 1px solid var(--ic-gray-200);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-converter-container .options-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .selected-images-list {
        max-height: 200px;
    }
    
    .selected-image-item {
        grid-template-columns: 40px 1fr auto;
        gap: 8px;
        padding: 8px;
    }
    
    .image-preview {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        max-height: 300px;
    }
    
    .page-item {
        padding: 8px;
    }
    
    .page-preview {
        height: 60px;
        font-size: 20px;
    }
    
    .bulk-actions {
        gap: 6px;
    }
    
    .bulk-action-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .result-item {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }
    
    .result-download {
        align-self: center;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .pdf-converter-container {
        padding: 16px;
        margin: 0 8px;
    }
    
    .converter-header {
        padding: 16px 0;
        margin-bottom: 20px;
    }
    
    .converter-title {
        font-size: 20px;
    }
    
    .upload-area {
        padding: 32px 16px;
        min-height: 120px;
    }
    
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .page-preview {
        height: 50px;
        font-size: 16px;
    }
}

/**
 * Modern Scrollbar Styling for PDF Converter
 * Hides arrows and creates clean, modern scrollbars
 */

/* Custom scrollbar cho tất cả scrollable areas trong PDF converter */
.pdf-converter-container *::-webkit-scrollbar {
	display: none !important;
    width: 8px;
    height: 8px;
}

.pdf-converter-container *::-webkit-scrollbar-track {
    background: var(--ic-gray-100);
    border-radius: 4px;
}

.pdf-converter-container *::-webkit-scrollbar-thumb {
    background: var(--ic-gray-400);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.pdf-converter-container *::-webkit-scrollbar-thumb:hover {
    background: var(--ic-gray-500);
}

/* Ẩn hoàn toàn scrollbar arrows */
.pdf-converter-container *::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.pdf-converter-container *::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar styling */
.pdf-converter-container * {
    scrollbar-width: none !important; /* Ẩn scrollbar trên Firefox */
    scrollbar-color: var(--ic-gray-400) var(--ic-gray-100);
}

/* Specific styling cho các vùng scrollable chính */

/* Selected images list scrollbar */
.selected-images-list {
    scrollbar-width: thin;
    scrollbar-color: var(--ic-gray-300) var(--ic-gray-50);
}

.selected-images-list::-webkit-scrollbar {
    width: 6px;
}

.selected-images-list::-webkit-scrollbar-track {
    background: var(--ic-gray-50);
    border-radius: 3px;
}

.selected-images-list::-webkit-scrollbar-thumb {
    background: var(--ic-gray-300);
    border-radius: 3px;
}

.selected-images-list::-webkit-scrollbar-thumb:hover {
    background: var(--ic-gray-400);
}

/* PDF pages grid scrollbar */
.pages-grid {
    scrollbar-width: thin;
    scrollbar-color: var(--ic-gray-300) var(--ic-gray-50);
}

.pages-grid::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.pages-grid::-webkit-scrollbar-track {
    background: var(--ic-gray-50);
    border-radius: 3px;
}

.pages-grid::-webkit-scrollbar-thumb {
    background: var(--ic-gray-300);
    border-radius: 3px;
}

.pages-grid::-webkit-scrollbar-thumb:hover {
    background: var(--ic-gray-400);
}

/* Results list scrollbar */
.results-list {
    scrollbar-width: thin;
    scrollbar-color: var(--ic-gray-300) var(--ic-gray-50);
}

.results-list::-webkit-scrollbar {
    width: 6px;
}

.results-list::-webkit-scrollbar-track {
    background: var(--ic-gray-50);
    border-radius: 3px;
}

.results-list::-webkit-scrollbar-thumb {
    background: var(--ic-gray-300);
    border-radius: 3px;
}

.results-list::-webkit-scrollbar-thumb:hover {
    background: var(--ic-gray-400);
}

/* Overlay scrollbar cho mobile-like experience */
.pdf-converter-container .overlay-scroll {
    overflow: overlay;
}

/* Scrollbar cho advanced options khi expanded */
.advanced-options::-webkit-scrollbar {
    width: 4px;
}

.advanced-options::-webkit-scrollbar-track {
    background: transparent;
}

.advanced-options::-webkit-scrollbar-thumb {
    background: var(--ic-gray-300);
    border-radius: 2px;
}

/* Custom scroll indicators cho touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Hide scrollbars on touch devices but keep functionality */
    .pdf-converter-container .selected-images-list,
    .pdf-converter-container .pages-grid,
    .pdf-converter-container .results-list {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .pdf-converter-container .selected-images-list::-webkit-scrollbar,
    .pdf-converter-container .pages-grid::-webkit-scrollbar,
    .pdf-converter-container .results-list::-webkit-scrollbar {
        display: none;
    }
    
    /* Add subtle scroll indicators */
    .pdf-converter-container .selected-images-list,
    .pdf-converter-container .pages-grid,
    .pdf-converter-container .results-list {
        position: relative;
    }
    
    .pdf-converter-container .selected-images-list::after,
    .pdf-converter-container .pages-grid::after,
    .pdf-converter-container .results-list::after {
        content: '';
        position: absolute;
        right: 2px;
        top: 50%;
        width: 3px;
        height: 20px;
        background: var(--ic-gray-400);
        border-radius: 2px;
        opacity: 0;
        transform: translateY(-50%);
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .pdf-converter-container .selected-images-list:hover::after,
    .pdf-converter-container .pages-grid:hover::after,
    .pdf-converter-container .results-list:hover::after {
        opacity: 0.6;
    }
}

/* Smooth scrolling behavior */
.pdf-converter-container .selected-images-list,
.pdf-converter-container .pages-grid,
.pdf-converter-container .results-list,
.pdf-converter-container .advanced-options {
    scroll-behavior: smooth;
}

/* Custom scrollbar animation on scroll */
@keyframes scrollbar-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pdf-converter-container *::-webkit-scrollbar-thumb:active {
    background: var(--ic-gray-600);
    animation: scrollbar-fade-in 0.2s ease;
}

/* Scrollbar styling for different themes */

/* Dark theme scrollbar */
.pdf-converter-theme-dark *::-webkit-scrollbar-track {
    background: #374151;
}

.pdf-converter-theme-dark *::-webkit-scrollbar-thumb {
    background: #6b7280;
}

.pdf-converter-theme-dark *::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.pdf-converter-theme-dark * {
    scrollbar-color: #6b7280 #374151;
}

/* Minimal theme scrollbar */
.pdf-converter-theme-minimal *::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.pdf-converter-theme-minimal *::-webkit-scrollbar-track {
    background: transparent;
}

.pdf-converter-theme-minimal *::-webkit-scrollbar-thumb {
    background: var(--ic-gray-300);
    border-radius: 3px;
}

.pdf-converter-theme-minimal *::-webkit-scrollbar-thumb:hover {
    background: var(--ic-gray-400);
}

/* Enhanced focus states for accessibility */
.pdf-converter-container .selected-images-list:focus-within,
.pdf-converter-container .pages-grid:focus-within,
.pdf-converter-container .results-list:focus-within {
    outline: 2px solid var(--ic-info-color);
    outline-offset: 2px;
}

/* Scrollbar cho specific converters */

/* JPG to PDF converter scrollbar tinting */
.jpg-to-pdf-converter .selected-images-list::-webkit-scrollbar-thumb {
    background: #dc2626;
    opacity: 0.7;
}

.jpg-to-pdf-converter .selected-images-list::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
    opacity: 1;
}

/* PDF to JPG converter scrollbar tinting */
.pdf-to-jpg-converter .pages-grid::-webkit-scrollbar-thumb,
.pdf-to-jpg-converter .results-list::-webkit-scrollbar-thumb {
    background: #2563eb;
    opacity: 0.7;
}

.pdf-to-jpg-converter .pages-grid::-webkit-scrollbar-thumb:hover,
.pdf-to-jpg-converter .results-list::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
    opacity: 1;
}

/* Responsive scrollbar adjustments */
@media (max-width: 768px) {
    .pdf-converter-container *::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    .pdf-converter-container .selected-images-list::-webkit-scrollbar,
    .pdf-converter-container .pages-grid::-webkit-scrollbar,
    .pdf-converter-container .results-list::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 480px) {
    .pdf-converter-container *::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    .pdf-converter-container .selected-images-list::-webkit-scrollbar,
    .pdf-converter-container .pages-grid::-webkit-scrollbar,
    .pdf-converter-container .results-list::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }
}