/* Slide2PDF Premium CSS - Part 1: Base & Tools */

/* Tool View Logic (Handled by JS) */
.tool-view {
    display: none !important;
}
.tool-view.active {
    display: block !important;
}

/* Navigation Tabs Active State */
.tab-btn.active {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

/* Dropzone Drag-Over Animation */
.dropzone {
    transition: all 0.2s ease-in-out;
}
.dropzone.drag-over {
    border-color: #2563eb;
    background-color: #eff6ff;
    transform: scale(1.01);
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    height: 6px;
    border-radius: 5px;
    outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Watermark Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
input:checked + .slider {
    background-color: #2563eb;
}
input:checked + .slider:before {
    transform: translateX(20px);
    }
/* Slide2PDF Premium CSS - Part 2: Passport Studio & Results Gallery */

/* Passport Studio Canvas Area (Transparent Checkered Background) */
.canvas-area {
    background-color: #f1f5f9;
    background-image: 
        repeating-linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%, #e2e8f0), 
        repeating-linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%, #e2e8f0);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
    border-radius: 8px;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

canvas#editCanvas, canvas#editCanvasStudio { 
    width: 100%; 
    height: auto; 
    display: block; 
    cursor: crosshair; 
}

/* Passport Studio Live Preview Grid */
.live-preview-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    background: #f8fafc; 
    padding: 12px; 
    border-radius: 8px; 
    border: 1px dashed #cbd5e1; 
    min-height: 80px; 
}

.mini-photo { 
    width: 35px; 
    height: 45px; 
    object-fit: cover; 
    border: 1px solid #94a3b8; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    background: white; 
}

/* Generated Results Gallery Cards */
.result-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}
.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}
.result-thumb-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.result-thumb { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}
.result-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    }

/* Slide2PDF Premium CSS - Part 3: Buttons & Custom Scrollbar */

/* Dynamic Download Button inside Results */
.btn-download-single {
    width: 100%;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-download-single:hover {
    background-color: #1d4ed8;
}

/* Custom Scrollbar for the Print Modal and whole page */
::-webkit-scrollbar { 
    width: 8px; 
    height: 8px; 
}
::-webkit-scrollbar-track { 
    background: #f8fafc; 
}
::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: #94a3b8; 
}

/* CropperJS Custom Theme Overrides (Makes crop box blue instead of default) */
.cropper-view-box,
.cropper-face {
    border-radius: 4px;
}
.cropper-line, .cropper-point {
    background-color: #2563eb !important;
}
.cropper-point.point-se {
    width: 8px !important;
    height: 8px !important;
}

/* Print Modal Overlay Blur */
.print-modal-overlay {
    backdrop-filter: blur(5px);
    }
    
