/* Image Resizer Specific Styles */

.tool-controls {
    margin: 24px 0;
    padding: 24px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #374151;
    border-radius: 12px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.preset-buttons {
    margin-bottom: 24px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.preset-btn {
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #60a5fa;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.preset-btn:active {
    transform: translateY(0);
}

.dimension-controls {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.dimension-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #64748b;
    flex-shrink: 0;
}

.dimension-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #374151;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.dimension-input:hover {
    border-color: #4b5563;
}

.dimension-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.format-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #374151;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.format-select:hover {
    border-color: #4b5563;
}

.format-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.preview-header {
    margin: 24px 0 16px;
    text-align: center;
}

.preview-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #e5e7eb;
}

.size-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #374151;
    border-radius: 12px;
    flex-wrap: wrap;
}

.size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.size-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.size-value {
    font-size: 18px;
    font-weight: 700;
    color: #e5e7eb;
}

.size-arrow {
    font-size: 24px;
    color: #64748b;
}

.preview-container {
    margin: 24px 0;
    padding: 24px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid #1f2937;
}

.preview-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.preview-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#preview-section {
    display: none;
}

#preview-section.active {
    display: block;
}

/* Light theme support */
[data-theme="light"] .preview-image-wrapper img {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.btn-download {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: rgba(30, 41, 59, 0.8);
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: #4b5563;
}

@media (max-width: 768px) {
    .dimension-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .dimension-link {
        transform: rotate(90deg);
        margin: 8px 0;
    }

    .size-comparison {
        flex-direction: column;
        gap: 12px;
    }

    .size-arrow {
        transform: rotate(90deg);
    }

    .preview-actions {
        flex-direction: column;
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
