/* RAW to JPG Converter Styles - Compact & Beautiful */

.raw-converter-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Top Section: Upload + Settings Side by Side */
.raw-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.raw-upload-card,
.raw-settings-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.raw-upload-card:hover,
.raw-settings-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.1);
}

.raw-upload-dropzone {
    border: 2px dashed var(--primary);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.03), rgba(52, 152, 219, 0.03));
    transition: all 0.3s ease;
}

.raw-upload-dropzone.drag-over {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.08);
    transform: scale(1.02);
}

/* Compact Files List */
.raw-files-compact {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.raw-files-scroll {
    max-height: 150px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.raw-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.raw-file-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.raw-file-item.processing {
    background: #fff3cd;
    border-color: #ffc107;
}

.raw-file-item.success {
    background: #d4edda;
    border-color: #28a745;
}

.raw-file-item.error {
    background: #f8d7da;
    border-color: #dc3545;
}

.raw-file-name {
    flex: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.raw-file-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-weight: 600;
}

.raw-file-status.pending {
    background: #e3f2fd;
    color: #1976d2;
}

.raw-file-status.processing {
    background: #fff3cd;
    color: #856404;
}

.raw-file-status.success {
    background: #d4edda;
    color: #155724;
}

.raw-file-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Compact Settings */
.raw-setting-compact {
    margin-bottom: 1rem;
}

.raw-setting-compact:last-child {
    margin-bottom: 0;
}

.raw-setting-compact label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

.raw-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.raw-slider:hover {
    opacity: 1;
}

.raw-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.raw-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: none;
}

.raw-select-compact {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.raw-select-compact:hover {
    border-color: var(--primary);
}

.raw-select-compact:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.1);
}

/* Detailed Progress */
.raw-progress-detailed {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.raw-progress-bar-wrapper {
    position: relative;
    width: 100%;
    height: 32px;
    background: #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.raw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 20px;
    transition: width 0.3s ease;
    box-shadow: 0 2px 10px rgba(142, 68, 173, 0.3);
}

.raw-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark);
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* Compact Results Section */
.raw-results-section {
    margin-top: 1.25rem;
}

.raw-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.raw-results-header h4 {
    margin: 0;
    font-size: 1rem;
}

.raw-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.raw-result-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.raw-result-item:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.raw-result-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.raw-result-info {
    padding: 0.6rem;
    background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
}

.raw-result-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.raw-result-size {
    font-size: 0.75rem;
    color: var(--gray);
}

.raw-result-download {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    font-size: 0.85rem;
}

.raw-result-download:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Image Modal for Preview */
.raw-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.raw-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.raw-modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.raw-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.raw-modal-close:hover {
    background: white;
    transform: rotate(90deg);
}

.raw-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.raw-modal-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.raw-modal-prev {
    left: -60px;
}

.raw-modal-next {
    right: -60px;
}

/* Summary Card */
.raw-summary-card {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.raw-summary-stat {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.raw-summary-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.raw-summary-stat.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.raw-summary-stat.failed {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #dc3545;
}

.raw-summary-stat.skipped {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
}

.raw-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.raw-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 992px) {
    .raw-top-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .raw-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .raw-result-image {
        height: 140px;
    }
    
    .raw-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .raw-modal-prev {
        left: 10px;
    }
    
    .raw-modal-next {
        right: 10px;
    }
    
    .raw-upload-dropzone {
        padding: 1.5rem 1rem;
    }
    
    .raw-upload-dropzone i {
        font-size: 2rem !important;
    }
}
