/* Image Compressor Workspace styles */

.compressor-workspace {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4% 120px;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .compressor-workspace {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Controls */
.sidebar-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: fit-content;
}

.control-group h3 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.4;
}

/* Sliders */
.slider-container {
    margin-bottom: 20px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.slider-header span {
    font-family: var(--font-mono);
    color: var(--primary);
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary-glow);
    transition: 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* Format Toggles */
.format-toggles {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid var(--border);
}

.btn-format {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.btn-format.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px var(--primary-glow);
}

/* Preview Panel & Area */
.preview-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-area {
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 24px;
    overflow: hidden;
}

.placeholder {
    text-align: center;
    color: var(--text-muted);
    z-index: 5;
}

.placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.05);
}

.placeholder h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

/* Comparison Layout */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
    gap: 20px;
    z-index: 5;
}

@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

.comparison-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 !important;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-meta span {
    font-family: var(--font-mono);
}

.highlight-green {
    color: #10b981;
    font-weight: 600;
}

.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-savings {
    background: #10b981;
    color: #020617;
    margin-left: auto;
    font-family: var(--font-body) !important;
}

.img-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.02) 75%), 
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.02) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    overflow: hidden;
    min-height: 350px;
}

.img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 576px) {
    .compressor-workspace {
        padding: 0 15px 60px;
        gap: 20px;
    }
    .img-wrapper {
        min-height: 240px;
        padding: 10px;
    }
    .card-meta {
        padding: 8px 12px;
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 8px;
    }
    .badge-savings {
        margin-left: auto;
    }
}
