/* Image Compressor — Tool-specific styles */

.compressor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 768px) { .compressor-container { grid-template-columns: 1fr; } }

.panel h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--border);
}

/* Upload area */
.upload-area {
    border: 2px dashed var(--border-dark);
    border-radius: var(--radius-md);
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    margin-bottom: 16px;
    position: relative;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-icon-svg {
    width: 40px; height: 40px;
    color: var(--muted-light);
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: color var(--transition);
}
.upload-area:hover .upload-icon-svg { color: var(--primary); }
.upload-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.upload-hint { color: var(--muted-light); font-size: 0.82rem; }
.file-input { display: none; }

/* Settings */
.settings { margin-top: 4px; }
.settings-heading {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 18px 0 14px;
}
.setting-group { margin-bottom: 16px; }

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    margin-top: 8px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.quality-display {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--muted-light);
    font-size: 0.78rem;
}

.format-options { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.format-btn {
    padding: 6px 14px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--muted);
    transition: all var(--transition);
}
.format-btn:hover { border-color: var(--primary); color: var(--primary); }
.format-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* File list */
.file-list { margin-bottom: 8px; }
.file-item {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    border: 1.5px solid var(--border);
}
.file-icon { margin-right: 10px; color: var(--muted-light); flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-size { color: var(--muted); font-size: 0.78rem; }
.status-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
}
.status-badge.done { background: #D1FAE5; color: #065F46; }
.status-badge.pending { background: var(--surface-2); color: var(--muted); }

/* Preview section */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 900px) { .preview-container { grid-template-columns: 1fr; } }

.image-box {
    text-align: center;
    padding: 14px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
}
.image-box h3 {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}
.image-preview {
    max-width: 100%;
    max-height: 160px;
    border-radius: 6px;
    margin-bottom: 8px;
    object-fit: contain;
}
.image-placeholder {
    width: 100%;
    height: 120px;
    background: var(--bg);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--border-dark);
}
.image-stats { font-size: 0.8rem; color: var(--muted); }

/* Compression stats */
.compression-stats {
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.stat-label { color: var(--muted); }
.stat-value { font-weight: 600; color: var(--text-secondary); }
.stat-value.better { color: var(--success); }

.download-options { display: flex; gap: 8px; flex-wrap: wrap; }
