/* Image Compressor specific styles */

.drop-zone {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #FF8E53;
    background: #fffaf5;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.drop-zone p {
    margin: 0 0 8px;
    color: #4a5568;
    font-size: 1rem;
}

.drop-zone small {
    color: #a0aec0;
    font-size: 0.85rem;
}

.browse-link {
    color: #FF6B6B;
    font-weight: 600;
    cursor: pointer;
}

/* Size Comparison */
.size-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f7fafc;
    border-radius: 12px;
    padding: 16px 20px;
    gap: 12px;
    position: relative;
}

.size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.size-label {
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.size-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
}

.size-value.compressed {
    color: #38a169;
}

.size-arrow {
    font-size: 1.5rem;
    color: #cbd5e0;
}

.savings {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    padding: 8px 12px;
    border-radius: 8px;
}

.savings .size-label {
    color: rgba(255, 255, 255, 0.8);
}

.savings .size-value {
    color: white;
}

/* Image Preview */
.image-preview {
    width: 100%;
    min-height: 250px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.preview-placeholder {
    color: #a0aec0;
    font-size: 0.95rem;
}

/* Disabled button state */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .size-comparison {
        flex-wrap: wrap;
        justify-content: center;
    }

    .size-arrow {
        transform: rotate(90deg);
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading state for size comparison */
.size-comparison.loading {
    opacity: 0.5;
    pointer-events: none;
}

.size-comparison.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top-color: #FF6B6B;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}